mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-27 08:12:44 +00:00
Fix infinite loop in DWARF parser spotted by Melkor
This commit is contained in:
parent
262b0cfd55
commit
f14eeabc01
@ -1388,10 +1388,10 @@ static RBinDwarfDebugAbbrev *r_bin_dwarf_parse_abbrev_raw(const ut8 *obuf, size_
|
||||
|
||||
r_bin_dwarf_init_debug_abbrev (da);
|
||||
|
||||
while (buf+1 < buf_end) {
|
||||
while (buf && buf+1 < buf_end) {
|
||||
offset = buf - obuf;
|
||||
buf = r_uleb128 (buf, (size_t)(buf_end-buf), &tmp);
|
||||
if (!tmp)
|
||||
if (!buf || !tmp)
|
||||
continue;
|
||||
|
||||
if (da->length == da->capacity)
|
||||
|
Loading…
x
Reference in New Issue
Block a user