mirror of
https://github.com/QuasarApp/LIEF.git
synced 2025-05-11 19:09:33 +00:00
Fix #412
This commit is contained in:
parent
3cee05646c
commit
a2a1ce6fe3
@ -903,9 +903,15 @@ void Parser::parse_segments(void) {
|
|||||||
|
|
||||||
static const auto check_section_in_segment =
|
static const auto check_section_in_segment =
|
||||||
[] (const Section* section, const Segment* segment) {
|
[] (const Section* section, const Segment* segment) {
|
||||||
return section->virtual_address() > 0 and section->virtual_address() >= segment->virtual_address() and
|
if (section->virtual_address() > 0) {
|
||||||
(section->virtual_address() + section->size()) <=
|
return section->virtual_address() >= segment->virtual_address() and
|
||||||
(segment->virtual_address() + segment->virtual_size());
|
(section->virtual_address() + section->size()) <=
|
||||||
|
(segment->virtual_address() + segment->virtual_size());
|
||||||
|
} else if (section->file_offset() > 0) {
|
||||||
|
return section->file_offset() >= segment->file_offset() and
|
||||||
|
(section->file_offset() + section->size()) < (segment->file_offset() + segment->physical_size());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
VLOG(VDEBUG) << "[+] Parse Segments";
|
VLOG(VDEBUG) << "[+] Parse Segments";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user