| Index: chrome/utility/safe_browsing/mac/hfs.cc
|
| diff --git a/chrome/utility/safe_browsing/mac/hfs.cc b/chrome/utility/safe_browsing/mac/hfs.cc
|
| index fd2f75337e4e239a29a30ddde7509723bee0026c..ce1b69c209e5ffd396620320b807c857de37e337 100644
|
| --- a/chrome/utility/safe_browsing/mac/hfs.cc
|
| +++ b/chrome/utility/safe_browsing/mac/hfs.cc
|
| @@ -383,12 +383,12 @@ bool HFSForkReadStream::Read(uint8_t* buffer,
|
| read_current_extent_ = true;
|
| }
|
|
|
| - size_t extent_offset = fork_logical_offset_ % extent_size.ValueOrDie();
|
| - size_t bytes_to_copy =
|
| - std::min(std::min(static_cast<size_t>(fork_.logicalSize) -
|
| - fork_logical_offset_,
|
| - extent_size.ValueOrDie() - extent_offset),
|
| - buffer_space_remaining);
|
| + size_t extent_offset = (fork_logical_offset_ % extent_size).ValueOrDie();
|
| + size_t bytes_to_copy = std::min(
|
| + std::min(
|
| + static_cast<size_t>(fork_.logicalSize) - fork_logical_offset_,
|
| + static_cast<size_t>((extent_size - extent_offset).ValueOrDie())),
|
| + buffer_space_remaining);
|
|
|
| memcpy(&buffer[buffer_size - buffer_space_remaining],
|
| ¤t_extent_data_[extent_offset],
|
|
|