git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31140
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
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)
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)