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

Unified Diff: net/disk_cache/blockfile/block_files.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « net/cert/x509_certificate_mac.cc ('k') | net/dns/dns_config_service_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/blockfile/block_files.cc
diff --git a/net/disk_cache/blockfile/block_files.cc b/net/disk_cache/blockfile/block_files.cc
index 9aa8f0f1856e81048b545058779b75acc8e33736..f46a937534993b78cbadd7326750cc48d25c4227 100644
--- a/net/disk_cache/blockfile/block_files.cc
+++ b/net/disk_cache/blockfile/block_files.cc
@@ -656,11 +656,11 @@ bool BlockFiles::FixBlockFileHeader(MappedFile* file) {
if (file_size < file_header.Size())
return false; // file_size > 2GB is also an error.
- const int kMinBlockSize = 36;
- const int kMaxBlockSize = 4096;
+ const int kMinHeaderBlockSize = 36;
+ const int kMaxHeaderBlockSize = 4096;
BlockFileHeader* header = file_header.Header();
- if (header->entry_size < kMinBlockSize ||
- header->entry_size > kMaxBlockSize || header->num_entries < 0)
+ if (header->entry_size < kMinHeaderBlockSize ||
+ header->entry_size > kMaxHeaderBlockSize || header->num_entries < 0)
return false;
// Make sure that we survive crashes.
« no previous file with comments | « net/cert/x509_certificate_mac.cc ('k') | net/dns/dns_config_service_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698