| Index: chrome/common/safe_browsing/mach_o_image_reader_mac.cc
|
| diff --git a/chrome/common/safe_browsing/mach_o_image_reader_mac.cc b/chrome/common/safe_browsing/mach_o_image_reader_mac.cc
|
| index 8d1c946d8f663cd0df15a04895881e07cc7b185c..3ce37516c723e9390373a607536df48e9c402b5b 100644
|
| --- a/chrome/common/safe_browsing/mach_o_image_reader_mac.cc
|
| +++ b/chrome/common/safe_browsing/mach_o_image_reader_mac.cc
|
| @@ -122,6 +122,11 @@ bool MachOImageReader::Initialize(const uint8_t* image, size_t image_size) {
|
| uint32_t arch_offset = do_swap ? OSSwapInt32(arch->offset) : arch->offset;
|
| uint32_t arch_size = do_swap ? OSSwapInt32(arch->size) : arch->size;
|
|
|
| + // Cannot refer back to headers of previous arches to cause
|
| + // recursive processing.
|
| + if (arch_offset < offset)
|
| + return false;
|
| +
|
| ByteSlice slice = data_->Slice(arch_offset, arch_size);
|
| if (!slice.IsValid())
|
| return false;
|
|
|