aboutsummaryrefslogtreecommitdiffstats
path: root/print/pdflib/files/patch-libs::tiff::tif_dirread.c
blob: 00b5f9bc930a6ea2b47dfce40b37a8700674d50b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
--- libs/tiff/tif_dirread.c.orig    Sun Jan 23 12:04:30 2005
+++ libs/tiff/tif_dirread.c Sun Jan 23 12:05:30 2005
@@ -69,7 +69,7 @@
    char    *cp = NULL;
    tsize_t bytes = nmemb * elem_size;
 
-   if (elem_size && bytes / elem_size == nmemb)
+   if (nmemb && elem_size && bytes / elem_size == nmemb)
        cp = (char*)_TIFFmalloc(tif, bytes);
 
    if (cp == NULL)