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

Unified Diff: core/fxcodec/codec/fx_codec_tiff.cpp

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
« no previous file with comments | « no previous file | third_party/libtiff/tif_aux.c » ('j') | third_party/libtiff/tif_aux.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcodec/codec/fx_codec_tiff.cpp
diff --git a/core/fxcodec/codec/fx_codec_tiff.cpp b/core/fxcodec/codec/fx_codec_tiff.cpp
index 09cfea41116576fb2113b23866af5d50d61877b1..204e6cb41f26a2c797711da27e53248f57aa1072 100644
--- a/core/fxcodec/codec/fx_codec_tiff.cpp
+++ b/core/fxcodec/codec/fx_codec_tiff.cpp
@@ -79,6 +79,10 @@ int _TIFFmemcmp(const void* ptr1, const void* ptr2, tmsize_t size) {
return FXSYS_memcmp(ptr1, ptr2, (size_t)size);
}
+int _TIFFIfMultiplicationOverflow(tmsize_t op1, tmsize_t op2) {
Tom Sepez 2016/08/26 23:05:28 Should be bool return value. Also, we return true
tracy_jiang 2016/08/26 23:44:16 We will change the naming logic. It made sense to
+ return op1 <= std::numeric_limits<tmsize_t>::max() / op2;
+}
+
TIFFErrorHandler _TIFFwarningHandler = nullptr;
TIFFErrorHandler _TIFFerrorHandler = nullptr;
« no previous file with comments | « no previous file | third_party/libtiff/tif_aux.c » ('j') | third_party/libtiff/tif_aux.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698