diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 01:42:46 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-10 01:42:46 +0000 |
commit | 0d435eae98fbe4f8055215a7aa6c483b07b7fa03 (patch) | |
tree | 639414ba0b636eab9cc88ee5df1e35a87022be34 /net | |
parent | 83517822988594fd4a578dd79d6fde230986fdbf (diff) | |
download | chromium_src-0d435eae98fbe4f8055215a7aa6c483b07b7fa03.zip chromium_src-0d435eae98fbe4f8055215a7aa6c483b07b7fa03.tar.gz chromium_src-0d435eae98fbe4f8055215a7aa6c483b07b7fa03.tar.bz2 |
Fix integer overflow in calculation of sparse I/O extent.
BUG=NONE
TEST=NONE
Review URL: http://codereview.chromium.org/372076
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/disk_cache/sparse_control.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/disk_cache/sparse_control.cc b/net/disk_cache/sparse_control.cc index 509ce78..06912de 100644 --- a/net/disk_cache/sparse_control.cc +++ b/net/disk_cache/sparse_control.cc @@ -176,7 +176,7 @@ int SparseControl::StartIO(SparseOperation op, int64 offset, net::IOBuffer* buf, return net::ERR_INVALID_ARGUMENT; // We only support up to 64 GB. - if (offset + buf_len >= 0x1000000000LL) + if (offset + buf_len >= 0x1000000000LL || offset + buf_len < 0) return net::ERR_CACHE_OPERATION_NOT_SUPPORTED; DCHECK(!user_buf_); |