diff options
Diffstat (limited to 'tools/tiff2pdf.c')
-rw-r--r-- | tools/tiff2pdf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c index 99c2cc8e..0bd909fb 100644 --- a/tools/tiff2pdf.c +++ b/tools/tiff2pdf.c @@ -1991,7 +1991,13 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){ if(t2p->pdf_compression == T2P_COMPRESS_ZIP) #endif { - TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc); + if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){ + TIFFError(TIFF2PDF_MODULE, + "Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS", + TIFFFileName(input)); + t2p->t2p_error = T2P_ERR_ERROR; + return; + } t2p_set_tiff_datasize(t2p, sbc[0]); return; } |