AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 1998

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



1998.06.08 13:53 "TIFFLib 3.4 beta 8, PackBits decoding", by Hansjoerg Oppermann

ARS GmbH, Hansjoerg Oppermann, 8.6.1998

Hi,

i have found a problem in the tifflib V3.4 beta 37.

We have an image with corrupt PackBits compression. It faild to
decompress with a memory injury. I have added some check before
writing.


tif_packbits.c:
209a210
> 	tidata_t end_op = op + occ;
214c215
< 	while (cc > 0 && (long)occ > 0) {
---
> 	while (cc > 0 && (long)occ > 0 && op < end_op) {
228c229
< 			while (n-- > 0)
---
> 			while (n-- > 0 && op < end_op)
231c232,233
< 			_TIFFmemcpy(op, bp, ++n);
---
> 		        if (op + n + 1 < end_op)
> 				_TIFFmemcpy(op, bp, ++n);


Thanks for your great TIFF library,

Oppermann