Skip to content

Commit

Permalink
Fix aeA when rz_analysis_op fails. (#4240)
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio committed Feb 15, 2024
1 parent 3b361e7 commit ac63502
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions librz/core/cmd/cmd_analysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,13 +1015,13 @@ static bool cmd_aea(RzCore *core, int mode, ut64 addr, int length) {
esil->nowrite = true;
for (ops = ptr = 0; ptr < buf_sz && hasNext(mode); ops++, ptr += len) {
len = rz_analysis_op(core->analysis, &aop, addr + ptr, buf + ptr, buf_sz - ptr, RZ_ANALYSIS_OP_MASK_ESIL | RZ_ANALYSIS_OP_MASK_HINT);
if (len < 1) {
RZ_LOG_ERROR("core: Invalid 0x%08" PFMT64x " instruction %02x %02x\n",
addr + ptr, buf[ptr], buf[ptr + 1]);
break;
}
esilstr = RZ_STRBUF_SAFEGET(&aop.esil);
if (RZ_STR_ISNOTEMPTY(esilstr)) {
if (len < 1) {
RZ_LOG_ERROR("core: Invalid 0x%08" PFMT64x " instruction %02x %02x\n",
addr + ptr, buf[ptr], buf[ptr + 1]);
break;
}
rz_analysis_esil_parse(esil, esilstr);
rz_analysis_esil_stack_free(esil);
}
Expand Down

0 comments on commit ac63502

Please sign in to comment.