mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-22 22:06:50 +00:00
* Fixed r_bin_pe segfault with .NET PE files
* Added windows 7 syscalls table to r_syscall under win7.c
This commit is contained in:
parent
857df2088b
commit
620431982f
@ -49,7 +49,8 @@ static struct r_bin_section_t* sections(struct r_bin_t *bin)
|
||||
struct r_bin_section_t *ret = NULL;
|
||||
PE_(r_bin_pe_section) *section = NULL;
|
||||
|
||||
sections_count = PE_(r_bin_pe_get_sections_count)(bin->bin_obj);
|
||||
if (!(sections_count = PE_(r_bin_pe_get_sections_count)(bin->bin_obj)))
|
||||
return NULL;
|
||||
|
||||
if ((section = malloc(sections_count * sizeof(PE_(r_bin_pe_section)))) == NULL)
|
||||
return NULL;
|
||||
@ -88,7 +89,8 @@ static struct r_bin_symbol_t* symbols(struct r_bin_t *bin)
|
||||
struct r_bin_symbol_t *ret = NULL;
|
||||
PE_(r_bin_pe_export) *symbol = NULL;
|
||||
|
||||
symbols_count = PE_(r_bin_pe_get_exports_count)(bin->bin_obj);
|
||||
if (!(symbols_count = PE_(r_bin_pe_get_exports_count)(bin->bin_obj)))
|
||||
return NULL;
|
||||
|
||||
if ((symbol = malloc(symbols_count * sizeof(PE_(r_bin_pe_export)))) == NULL)
|
||||
return NULL;
|
||||
@ -122,7 +124,8 @@ static struct r_bin_import_t* imports(struct r_bin_t *bin)
|
||||
struct r_bin_import_t *ret = NULL;
|
||||
PE_(r_bin_pe_import) *import = NULL;
|
||||
|
||||
imports_count = PE_(r_bin_pe_get_imports_count)(bin->bin_obj);
|
||||
if (!(imports_count = PE_(r_bin_pe_get_imports_count)(bin->bin_obj)))
|
||||
return NULL;
|
||||
|
||||
if ((import = malloc(imports_count * sizeof(PE_(r_bin_pe_import)))) == NULL)
|
||||
return NULL;
|
||||
|
1230
libr/syscall/win7.c
Normal file
1230
libr/syscall/win7.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user