security fix (patch 1089659)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
914ca1d826
commit
2c15c98b33
@ -1 +1 @@
|
||||
3.6.1-2
|
||||
3.6.1-3
|
||||
|
@ -67,7 +67,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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user