Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(877)

Unified Diff: courgette/disassembler_elf_32_x86.cc

Issue 664803002: Fix courgette ELF x86 dissembler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: rebase again Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « courgette/disassembler_elf_32.cc ('k') | courgette/encode_decode_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: courgette/disassembler_elf_32_x86.cc
diff --git a/courgette/disassembler_elf_32_x86.cc b/courgette/disassembler_elf_32_x86.cc
index 74496d3ca2dc94ca8395abc215b7ba5a16fcae52..d2c1c86b440a4c1f5faa7e4f93c132a7fdc5bb67 100644
--- a/courgette/disassembler_elf_32_x86.cc
+++ b/courgette/disassembler_elf_32_x86.cc
@@ -91,6 +91,9 @@ CheckBool DisassemblerElf32X86::ParseRelocationSection(
uint32 section_relocs_count = section_header->sh_size /
section_header->sh_entsize;
+ if (abs32_locations_.empty())
+ match = false;
+
if (abs32_locations_.size() > section_relocs_count)
match = false;
« no previous file with comments | « courgette/disassembler_elf_32.cc ('k') | courgette/encode_decode_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698