packages/libs/tiff/patches/903-cve-2009-2285.patch

23 lines
791 B
Diff
Raw Normal View History

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-2285
--- a/libtiff/tif_lzw.c
+++ b/libtiff/tif_lzw.c
@@ -422,7 +422,7 @@ LZWDecode(TIFF* tif, tidata_t op0, tsize
NextCode(tif, sp, bp, code, GetNextCode);
if (code == CODE_EOI)
break;
- if (code == CODE_CLEAR) {
+ if (code >= CODE_CLEAR) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
"LZWDecode: Corrupted LZW table at scanline %d",
tif->tif_row);
@@ -626,7 +626,7 @@ LZWDecodeCompat(TIFF* tif, tidata_t op0,
NextCode(tif, sp, bp, code, GetNextCodeCompat);
if (code == CODE_EOI)
break;
- if (code == CODE_CLEAR) {
+ if (code >= CODE_CLEAR) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
"LZWDecode: Corrupted LZW table at scanline %d",
tif->tif_row);