Address morning ret2libc comments

This commit is contained in:
pancake 2018-10-30 13:09:23 +01:00
parent 57c9ab3da6
commit 30867cb834
2 changed files with 9 additions and 8 deletions

View File

@ -2225,13 +2225,12 @@ struct addr_t* MACH0_(get_entrypoint)(struct MACH0_(obj_t)* bin) {
if (!entry) {
return NULL;
}
if (bin->entry) {
entry->addr = entry_to_vaddr (bin);
entry->offset = addr_to_offset (bin, entry->addr);
entry->haddr = sdb_num_get (bin->kv, "mach0.entry.offset", 0);
sdb_num_set (bin->kv, "mach0.entry.vaddr", entry->addr, 0);
sdb_num_set (bin->kv, "mach0.entry.paddr", bin->entry, 0);
}
entry->addr = entry_to_vaddr (bin);
entry->offset = addr_to_offset (bin, entry->addr);
entry->haddr = sdb_num_get (bin->kv, "mach0.entry.offset", 0);
sdb_num_set (bin->kv, "mach0.entry.vaddr", entry->addr, 0);
sdb_num_set (bin->kv, "mach0.entry.paddr", bin->entry, 0);
if (entry->offset == 0) {
int i;
for (i = 0; i < bin->nsects; i++) {

View File

@ -168,7 +168,9 @@ R_API RFlagItem *r_flag_item_clone(RFlagItem *item) {
}
R_API void r_flag_item_free(RFlagItem *item) {
r_return_if_fail (item);
if (!item) {
return;
}
free (item->color);
free (item->comment);
free (item->alias);