Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Unified Diff: third_party/libtiff/tif_aux.c

Issue 2284063002: Fix for #618267. Adding a method to determine if multiplication has (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libtiff/tif_aux.c
diff --git a/third_party/libtiff/tif_aux.c b/third_party/libtiff/tif_aux.c
index 927150a49352deaf881631a3abd6e00e09887993..3613fbae2b73ce47d9b75bbaed18c336316633f0 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 && bytes / elem_size == nmemb)
+ if (nmemb && elem_size && _TIFFIfMultiplicationOverflow(nmemb, elem_size))//&& bytes / elem_size == nmemb
Tom Sepez 2016/08/26 23:05:28 remove the code following the //
cp = _TIFFrealloc(buffer, bytes);
if (cp == NULL) {

Powered by Google App Engine
This is Rietveld 408576698