Commit 279dbb9a authored by Johann's avatar Johann Committed by Gerrit Code Review
Browse files

Merge "Skip COMDAT sections when parsing COFF"

parents cf479baa 25eeac05
......@@ -666,7 +666,11 @@ int parse_coff(uint8_t *buf, size_t sz) {
}
strcpy(sectionlist[i], sectionname);
if (!strcmp(sectionname, ".rdata")) sectionrawdata_ptr = get_le32(ptr + 20);
// check if it's .rdata and is not a COMDAT section.
if (!strcmp(sectionname, ".rdata") &&
(get_le32(ptr + 36) & 0x1000) == 0) {
sectionrawdata_ptr = get_le32(ptr + 20);
}
ptr += 40;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment