File tiff-3.8.2-lzw-CVE-2009-2285.patch of Package tiff3

--- libtiff/tif_lzw.c
+++ libtiff/tif_lzw.c
@@ -422,7 +422,7 @@
 			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);
@@ -625,7 +625,7 @@
 			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);
openSUSE Build Service is sponsored by