| Index: chrome/utility/safe_browsing/mac/udif.cc
|
| diff --git a/chrome/utility/safe_browsing/mac/udif.cc b/chrome/utility/safe_browsing/mac/udif.cc
|
| index 90fde88ca673dce9d79304dfbc5becff37326b70..92bd1ac4f7a1b8532b6216cd6f7209e6bb398e1e 100644
|
| --- a/chrome/utility/safe_browsing/mac/udif.cc
|
| +++ b/chrome/utility/safe_browsing/mac/udif.cc
|
| @@ -609,7 +609,8 @@ off_t UDIFPartitionReadStream::Seek(off_t offset, int whence) {
|
| new UDIFBlockChunkReadStream(stream_, block_size_, chunk));
|
| }
|
| current_chunk_ = chunk_number;
|
| - chunk_stream_->Seek(decompress_read_offset.ValueOrDie(), SEEK_SET);
|
| + if (chunk_stream_->Seek(decompress_read_offset.ValueOrDie(), SEEK_SET) == -1)
|
| + return -1;
|
|
|
| return offset;
|
| }
|
| @@ -657,7 +658,8 @@ bool UDIFBlockChunkReadStream::Read(uint8_t* buffer,
|
|
|
| off_t UDIFBlockChunkReadStream::Seek(off_t offset, int whence) {
|
| DCHECK_EQ(SEEK_SET, whence);
|
| - DCHECK_LT(static_cast<uint64_t>(offset), length_in_bytes_);
|
| + if (static_cast<uint64_t>(offset) >= length_in_bytes_)
|
| + return -1;
|
| offset_ = offset;
|
| return offset_;
|
| }
|
|
|