X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/00cb87b4be158b91f91dc7a7026bfd6665e7560f..f5766910b6731eb03e82371416e9778203396ce7:/src/tiff/tif_fax3.c?ds=inline diff --git a/src/tiff/tif_fax3.c b/src/tiff/tif_fax3.c index e816107fc0..9474e977c7 100644 --- a/src/tiff/tif_fax3.c +++ b/src/tiff/tif_fax3.c @@ -309,7 +309,7 @@ Fax3Decode2D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s) * this is <8 bytes. We optimize the code here to reflect the * machine characteristics. */ -#if defined(__alpha) || _MIPS_SZLONG == 64 || defined(__LP64__) || defined(__arch64__) +#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(__arch64__) #define FILL(n, cp) \ switch (n) { \ case 15:(cp)[14] = 0xff; case 14:(cp)[13] = 0xff; case 13: (cp)[12] = 0xff;\ @@ -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)