Blame SOURCES/libtiff-CVE-2012-3401.patch

0e6869
Upstream patch for CVE-2012-3401.
0e6869
0e6869
0e6869
diff -Naur tiff-3.9.4.orig/tools/tiff2pdf.c tiff-3.9.4/tools/tiff2pdf.c
0e6869
--- tiff-3.9.4.orig/tools/tiff2pdf.c	2010-06-13 16:51:44.000000000 -0400
0e6869
+++ tiff-3.9.4/tools/tiff2pdf.c	2012-12-11 11:17:56.506344841 -0500
0e6869
@@ -1090,6 +1090,7 @@
0e6869
 				"Can't set directory %u of input file %s", 
0e6869
 				i,
0e6869
 				TIFFFileName(input));
0e6869
+			t2p->t2p_error = T2P_ERR_ERROR;
0e6869
 			return;
0e6869
 		}
0e6869
 		if(TIFFGetField(input, TIFFTAG_PAGENUMBER, &pagen, &paged)){
0e6869
@@ -3153,6 +3154,7 @@
0e6869
 			"Can't allocate %u bytes of memory for t2p_process_ojpeg_tables, %s", 
0e6869
 			2048, 
0e6869
 			TIFFFileName(input));
0e6869
+		t2p->t2p_error = T2P_ERR_ERROR;
0e6869
 		return(0);
0e6869
 	}
0e6869
 	_TIFFmemset(t2p->pdf_ojpegdata, 0x00, 2048);
0e6869
@@ -5248,6 +5250,7 @@
0e6869
 			TIFF2PDF_MODULE, 
0e6869
 			"Can't allocate %u bytes of memory for t2p_write_pdf", 
0e6869
 			t2p->pdf_xrefcount * sizeof(uint32) );
0e6869
+		t2p->t2p_error = T2P_ERR_ERROR;
0e6869
 		return(written);
0e6869
 	}
0e6869
 	t2p->pdf_xrefcount=0;