mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-20 20:55:32 +00:00
refix dwarf crash
This commit is contained in:
parent
0d42b6c017
commit
965c0400d2
@ -1105,7 +1105,7 @@ static const ut8 *r_bin_dwarf_parse_attr_value(const ut8 *obuf, int obuf_len,
|
||||
const ut8 *buf_end = obuf + obuf_len;
|
||||
size_t j;
|
||||
|
||||
if (!spec || !value || !hdr || !obuf || !*obuf) {
|
||||
if (!spec || !value || !hdr || !obuf) {
|
||||
return NULL;
|
||||
}
|
||||
value->form = spec->attr_form;
|
||||
@ -1161,7 +1161,7 @@ static const ut8 *r_bin_dwarf_parse_attr_value(const ut8 *obuf, int obuf_len,
|
||||
value->encoding.data = READ (buf, ut64);
|
||||
break;
|
||||
case DW_FORM_string:
|
||||
value->encoding.str_struct.string = strdup((const char*)buf);
|
||||
value->encoding.str_struct.string = *buf? strdup((const char*)buf) : NULL;
|
||||
buf += (strlen((const char*)buf) + 1);
|
||||
break;
|
||||
case DW_FORM_block:
|
||||
|
Loading…
x
Reference in New Issue
Block a user