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

Unified Diff: tools/imagediff/image_diff.cc

Issue 12296017: Make imagediff build on Win64 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/imagediff/image_diff.cc
===================================================================
--- tools/imagediff/image_diff.cc (revision 183137)
+++ tools/imagediff/image_diff.cc (working copy)
@@ -20,6 +20,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/process_util.h"
+#include "base/safe_numerics.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "ui/gfx/codec/png_codec.h"
@@ -321,7 +322,8 @@
diff_image.w() * 4, false,
std::vector<gfx::PNGCodec::Comment>(), &png_encoding);
if (file_util::WriteFile(out_file,
- reinterpret_cast<char*>(&png_encoding.front()), png_encoding.size()) < 0)
+ reinterpret_cast<char*>(&png_encoding.front()),
+ base::checked_numeric_cast<int>(png_encoding.size())) < 0)
return kStatusError;
return kStatusDifferent;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698