From 83e0f258b24f33669da040376109d843b7c20873 Mon Sep 17 00:00:00 2001 From: Packit Date: Sep 17 2020 18:32:16 +0000 Subject: Apply patch libtiff-CVE-2012-3401.patch patch_name: libtiff-CVE-2012-3401.patch present_in_specfile: true --- diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c index cbece04..1f54a6b 100644 --- a/tools/tiff2pdf.c +++ b/tools/tiff2pdf.c @@ -1119,6 +1119,7 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ "Can't set directory %u of input file %s", i, TIFFFileName(input)); + t2p->t2p_error = T2P_ERR_ERROR; return; } if(TIFFGetField(input, TIFFTAG_PAGENUMBER, &pagen, &paged)){ @@ -3233,6 +3234,7 @@ int t2p_process_ojpeg_tables(T2P* t2p, TIFF* input){ "Can't allocate %u bytes of memory for t2p_process_ojpeg_tables, %s", 2048, TIFFFileName(input)); + t2p->t2p_error = T2P_ERR_ERROR; return(0); } _TIFFmemset(t2p->pdf_ojpegdata, 0x00, 2048); @@ -5328,6 +5330,7 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){ TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_write_pdf", t2p->pdf_xrefcount * sizeof(uint32) ); + t2p->t2p_error = T2P_ERR_ERROR; return(written); } t2p->pdf_xrefcount=0;