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

Unified Diff: third_party/libtiff/tif_aux.c

Issue 2284063002: Fix for #618267. Adding a method to determine if multiplication has (Closed)
Patch Set: creating a patch and modifying readme for libtiff 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
« no previous file with comments | « third_party/libtiff/README.pdfium ('k') | third_party/libtiff/tiffio.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3ce3680ab2ae23cd86654230d47b2aaf81c18955 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))
cp = _TIFFrealloc(buffer, bytes);
if (cp == NULL) {
« no previous file with comments | « third_party/libtiff/README.pdfium ('k') | third_party/libtiff/tiffio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698