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

Unified Diff: third_party/zlib/google/zip_reader.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « third_party/zlib/google.patch ('k') | third_party/zlib/gzlib.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/zlib/google/zip_reader.cc
diff --git a/third_party/zlib/google/zip_reader.cc b/third_party/zlib/google/zip_reader.cc
index 339eb1141c7b4e2103e60324b3ff150b0b7bda91..a1dddfb85388a429ffc2e1308a4c39be57f87b5d 100644
--- a/third_party/zlib/google/zip_reader.cc
+++ b/third_party/zlib/google/zip_reader.cc
@@ -364,8 +364,9 @@ bool ZipReader::ExtractCurrentEntryToString(
// correct. However, we need to assume that the uncompressed size could be
// incorrect therefore this function needs to read as much data as possible.
std::string contents;
- contents.reserve(std::min<size_t>(
- max_read_bytes, current_entry_info()->original_size()));
+ contents.reserve(static_cast<size_t>(std::min(
+ static_cast<int64>(max_read_bytes),
+ current_entry_info()->original_size())));
bool success = true; // This becomes false when something bad happens.
char buf[internal::kZipBufSize];
« no previous file with comments | « third_party/zlib/google.patch ('k') | third_party/zlib/gzlib.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698