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

Unified Diff: chrome/test/chromedriver/util.cc

Issue 1485023003: Misc truncation fixes for gn builds with VS 2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes to four more components/content files Created 5 years 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: chrome/test/chromedriver/util.cc
diff --git a/chrome/test/chromedriver/util.cc b/chrome/test/chromedriver/util.cc
index d0d241699a9dac6bb923fba84cd6dec3d126c0fb..b0c84b83d57d40ae3b00c4444994429c015c81f6 100644
--- a/chrome/test/chromedriver/util.cc
+++ b/chrome/test/chromedriver/util.cc
@@ -304,8 +304,8 @@ struct ZipEntry {
stream.WriteUInt32(crc);
stream.WriteUInt32(compressed_data.length());
stream.WriteUInt32(uncompressed_size);
- stream.WriteUInt16(name.length());
- stream.WriteUInt16(fields.length());
+ stream.WriteUInt16(base::checked_cast<uint16>(name.length()));
+ stream.WriteUInt16(base::checked_cast<uint16>(fields.length()));
stream.WriteString(name);
stream.WriteString(fields);
stream.WriteString(compressed_data);
@@ -322,8 +322,8 @@ struct ZipEntry {
stream.WriteUInt32(crc);
stream.WriteUInt32(compressed_data.length());
stream.WriteUInt32(uncompressed_size);
- stream.WriteUInt16(name.length());
- stream.WriteUInt16(fields.length());
+ stream.WriteUInt16(base::checked_cast<uint16>(name.length()));
+ stream.WriteUInt16(base::checked_cast<uint16>(fields.length()));
stream.WriteUInt16(0); // Comment length.
stream.WriteUInt16(0); // Disk number where file starts.
stream.WriteUInt16(0); // Internal file attr.
« no previous file with comments | « chrome/test/chromedriver/key_converter_unittest.cc ('k') | components/gcm_driver/crypto/gcm_message_cryptographer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698