Skip to content

Commit

Permalink
Fix potential UaF bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
GJDuck committed Jul 4, 2022
1 parent 2d1d3bf commit c30c678
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/e9patch/e9tactics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ bool patch(Binary &B, Instr *I, const Trampoline *T)
return false; // Failed :(
}

const char *name = getTacticName(P->tactic);
commit(B, P);
if (option_debug)
{
Expand All @@ -770,8 +771,7 @@ bool patch(Binary &B, Instr *I, const Trampoline *T)
"entry=" ADDRESS_FORMAT ", "
"trampoline=" ADDRESS_FORMAT ".." ADDRESS_FORMAT ", "
"offset=%zd]",
I->addr, I->size, getTacticName(P->tactic),
ADDRESS(entry), ADDRESS(lb), ADDRESS(ub),
I->addr, I->size, name, ADDRESS(entry), ADDRESS(lb), ADDRESS(ub),
(ssize_t)(entry - lb));
}
log(COLOR_GREEN, '.');
Expand Down

0 comments on commit c30c678

Please sign in to comment.