You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
510 B
13 lines
510 B
diff --git a/third_party/libtiff/tif_aux.c b/third_party/libtiff/tif_aux.c |
|
index 3ce3680..bc4ea01 100644 |
|
--- a/third_party/libtiff/tif_aux.c |
|
+++ b/third_party/libtiff/tif_aux.c |
|
@@ -69,7 +69,7 @@ _TIFFCheckRealloc(TIFF* tif, void* buffer, |
|
/* |
|
* XXX: Check for integer overflow. |
|
*/ |
|
- if (nmemb && elem_size && !_TIFFIfMultiplicationOverflow(nmemb, elem_size)) |
|
+ if (nmemb > 0 && elem_size > 0 && !_TIFFIfMultiplicationOverflow(nmemb, elem_size)) |
|
cp = _TIFFrealloc(buffer, bytes); |
|
|
|
if (cp == NULL) {
|
|
|