X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/00cb87b4be158b91f91dc7a7026bfd6665e7560f..3168b4c3ae31dc190dbf02b40a7ee1b9353b6e43:/src/tiff/tif_fax3.c diff --git a/src/tiff/tif_fax3.c b/src/tiff/tif_fax3.c index e816107fc0..4318bf3a32 100644 --- a/src/tiff/tif_fax3.c +++ b/src/tiff/tif_fax3.c @@ -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)