| Index: net/disk_cache/blockfile/file_posix.cc
|
| diff --git a/net/disk_cache/blockfile/file_posix.cc b/net/disk_cache/blockfile/file_posix.cc
|
| index cdde5b0d45e73e4782ef493046dfb70a547cb1d3..828200588a9b66ac7a9d2ec14e304cca6a354c54 100644
|
| --- a/net/disk_cache/blockfile/file_posix.cc
|
| +++ b/net/disk_cache/blockfile/file_posix.cc
|
| @@ -139,6 +139,8 @@ size_t File::GetLength() {
|
| DCHECK(base_file_.IsValid());
|
| int64_t len = base_file_.GetLength();
|
|
|
| + if (len < 0)
|
| + return 0;
|
| if (len > static_cast<int64_t>(std::numeric_limits<uint32_t>::max()))
|
| return std::numeric_limits<uint32_t>::max();
|
|
|
|
|