mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-23 14:28:07 +00:00
Check mallocs in PE
This commit is contained in:
parent
44b2e44f3d
commit
1fc7dd4cf6
@ -374,12 +374,13 @@ static RBinInfo* info(RBinFile *arch) {
|
||||
ret->dbg_info |= R_BIN_DBG_RELOCS;
|
||||
|
||||
if (PE_(r_bin_pe_get_debug_data)(arch->o->bin_obj, &di)) {
|
||||
ret->guid = malloc (GUIDSTR_LEN+1);
|
||||
strncpy (ret->guid, di.guidstr, GUIDSTR_LEN);
|
||||
ret->guid[GUIDSTR_LEN] = 0;
|
||||
ret->debug_file_name = malloc (DBG_FILE_NAME_LEN+1);
|
||||
strncpy (ret->debug_file_name, di.file_name, DBG_FILE_NAME_LEN);
|
||||
ret->debug_file_name[DBG_FILE_NAME_LEN] = 0;
|
||||
ret->guid = r_str_ndup (di.guidstr, GUIDSTR_LEN);
|
||||
if (ret->guid) {
|
||||
ret->debug_file_name = r_str_ndup (di.file_name, DBG_FILE_NAME_LEN);
|
||||
if (!ret->debug_file_name) {
|
||||
R_FREE (ret->guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user