mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-04 04:17:25 +00:00
Fix recently introduced oobread in the dwarf parser
This commit is contained in:
parent
67fbe02de9
commit
3089ada0b9
@ -1881,7 +1881,7 @@ static const ut8 *parse_attr_value(const ut8 *obuf, int obuf_len, RBinDwarfAttrD
|
||||
ut8 *section = NULL;
|
||||
section = get_section_bytes (bin, section_name, §ion_len);
|
||||
if (section && value->string.offset < section_len) {
|
||||
char *ds = r_str_ndup ((const char *)(section + value->string.offset), section_len - 1);
|
||||
char *ds = r_str_ndup ((const char *)(section + value->string.offset), section_len - value->string.offset);
|
||||
if (ds) {
|
||||
r_str_ansi_strip (ds);
|
||||
r_str_replace_ch (ds, '\n', 0, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user