diff options
| author | Mark Wielaard <[email protected]> | 2014-11-23 18:26:16 +0100 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2014-11-26 20:24:05 +0100 |
| commit | 4929606ee8c43154e7b1900d4ffb967f72147aaf (patch) | |
| tree | 581ed27e4b0c1e48ec319f8db42e9dbd074fcae5 /src/readelf.c | |
| parent | 51abc748db839f35589611f7129168728a1ebcc0 (diff) | |
readelf: Check length for nexthdr overflow in print_debug_aranges_section.
Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src/readelf.c')
| -rw-r--r-- | src/readelf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/readelf.c b/src/readelf.c index 529af5a4..c3ebe743 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -4693,7 +4693,7 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)), printf (gettext ("\n Length: %6" PRIu64 "\n"), (uint64_t) length); - if (nexthdr > readendp) + if (unlikely (length > readendp - readp)) goto invalid_data; if (length == 0) |
