]> git.saurik.com Git - wxWidgets.git/blobdiff - src/tiff/tif_fax3.c
Don't call StartingKey if the key was F2
[wxWidgets.git] / src / tiff / tif_fax3.c
index e816107fc01979233aef31aa8e5875f8b69aa6aa..4318bf3a3203967e180d2841921a8c883bdb319b 100644 (file)
@@ -443,7 +443,7 @@ CheckMalloc(TIFF* tif, size_t nmemb, size_t elem_size, const char* what)
        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(bytes);
 
        if (cp == NULL)