mirror of
https://github.com/radareorg/radare2.git
synced 2024-10-07 10:33:30 +00:00
Fix undefined behaviour in mach0 section
This commit is contained in:
parent
f52b27e2ec
commit
e5cfb20adb
@ -1321,7 +1321,7 @@ struct section_t* MACH0_(get_sections)(struct MACH0_(obj_t)* bin) {
|
||||
if (to < 1) {
|
||||
return NULL;
|
||||
}
|
||||
if (!(sections = malloc ((bin->nsects + 1) * sizeof (struct section_t)))) {
|
||||
if (!(sections = calloc (bin->nsects + 1, sizeof (struct section_t)))) {
|
||||
return NULL;
|
||||
}
|
||||
for (i = 0; i < to; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user