1diff --git a/third_party/libtiff/tif_aux.c b/third_party/libtiff/tif_aux.c 2index 3ce3680..bc4ea01 100644 3--- a/third_party/libtiff/tif_aux.c 4+++ b/third_party/libtiff/tif_aux.c 5@@ -69,7 +69,7 @@ _TIFFCheckRealloc(TIFF* tif, void* buffer, 6 /* 7 * XXX: Check for integer overflow. 8 */ 9- if (nmemb && elem_size && !_TIFFIfMultiplicationOverflow(nmemb, elem_size)) 10+ if (nmemb > 0 && elem_size > 0 && !_TIFFIfMultiplicationOverflow(nmemb, elem_size)) 11 cp = _TIFFrealloc(buffer, bytes); 12 13 if (cp == NULL) { 14