mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-14 16:59:08 +00:00
fix heap oob-read in dwarf parser
https://gist.github.com/4352a2f4a239a96b90e7b23bb22e8ef1 for repro file
This commit is contained in:
parent
2c086751b9
commit
36650442f5
@ -1271,6 +1271,10 @@ static const ut8 *r_bin_dwarf_parse_comp_unit(Sdb *s, const ut8 *obuf,
|
||||
cu->dies[cu->length].tag = da->decls[abbr_code - 1].tag;
|
||||
abbr_code += offset;
|
||||
|
||||
if (da->capacity < abbr_code) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < da->decls[abbr_code - 1].length; i++) {
|
||||
if (cu->dies[cu->length].length ==
|
||||
cu->dies[cu->length].capacity)
|
||||
|
Loading…
Reference in New Issue
Block a user