| Index: net/disk_cache/block_files.cc
|
| diff --git a/net/disk_cache/block_files.cc b/net/disk_cache/block_files.cc
|
| index cd7e5cffb064d19a5df87e75caaf5009933f2687..0e9eb04ac5e82dddfb4e2b151f631827f4a5d647 100644
|
| --- a/net/disk_cache/block_files.cc
|
| +++ b/net/disk_cache/block_files.cc
|
| @@ -247,6 +247,12 @@ bool BlockFiles::OpenBlockFile(int index) {
|
| return false;
|
| }
|
|
|
| + if (file->GetLength() < static_cast<size_t>(kBlockHeaderSize)) {
|
| + LOG(ERROR) << "File too small " << name;
|
| + file->Release();
|
| + return false;
|
| + }
|
| +
|
| block_files_[index] = file;
|
|
|
| BlockFileHeader* header = reinterpret_cast<BlockFileHeader*>(file->buffer());
|
|
|