diff options
Diffstat (limited to 'net/disk_cache/blockfile/backend_worker_v3.cc')
-rw-r--r-- | net/disk_cache/blockfile/backend_worker_v3.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/disk_cache/blockfile/backend_worker_v3.cc b/net/disk_cache/blockfile/backend_worker_v3.cc index 9d2e6a6..2fddb9b 100644 --- a/net/disk_cache/blockfile/backend_worker_v3.cc +++ b/net/disk_cache/blockfile/backend_worker_v3.cc @@ -4,6 +4,10 @@ #include "net/disk_cache/blockfile/backend_worker_v3.h" +#include <stdint.h> + +#include <limits> + #include "base/bind.h" #include "base/bind_helpers.h" #include "base/files/file_path.h" @@ -397,7 +401,7 @@ bool BackendImpl::CheckIndex() { #if !defined(NET_BUILD_STRESS_CACHE) if (data_->header.num_bytes < 0 || - (max_size_ < kint32max - kDefaultCacheSize && + (max_size_ < std::numeric_limits<int32_t>::max() - kDefaultCacheSize && data_->header.num_bytes > max_size_ + kDefaultCacheSize)) { LOG(ERROR) << "Invalid cache (current) size"; return false; |