Skip to content

Commit

Permalink
Fix #9943 - Invalid free on RAnal.avr
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Apr 24, 2018
1 parent ec75785 commit 9d348bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libr/anal/p/anal_avr.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ INST_HANDLER (cpi) { // CPI Rd, K
INST_HANDLER (cpse) { // CPSE Rd, Rr
int r = (buf[0] & 0xf) | ((buf[1] & 0x2) << 3);
int d = ((buf[0] >> 4) & 0xf) | ((buf[1] & 0x1) << 4);
RAnalOp next_op;
RAnalOp next_op = {0};

// calculate next instruction size (call recursively avr_op_analyze)
// and free next_op's esil string (we dont need it now)
Expand Down
3 changes: 2 additions & 1 deletion libr/core/cmd_anal.c
Original file line number Diff line number Diff line change
Expand Up @@ -4350,8 +4350,9 @@ static void cmd_anal_esil(RCore *core, const char *input) {
{
// anal ESIL to REIL.
RAnalEsil *esil = r_anal_esil_new (stacksize, iotrap, addrsize);
if (!esil)
if (!esil) {
return;
}
r_anal_esil_to_reil_setup (esil, core->anal, romem, stats);
r_anal_esil_set_pc (esil, core->offset);
r_anal_esil_parse (esil, input + 2);
Expand Down

0 comments on commit 9d348bc

Please sign in to comment.