Skip to content

Commit

Permalink
Fix segfault when calling get_src_regname on an invalid or unaligned …
Browse files Browse the repository at this point in the history
…address (#10977)
  • Loading branch information
exokortex authored and radare committed Aug 7, 2018
1 parent b850ae7 commit a76b965
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libr/core/anal_tp.c
Expand Up @@ -123,6 +123,9 @@ static void var_retype(RAnal *anal, RAnalVar *var, const char *vname, char *type
static void get_src_regname(RCore *core, ut64 addr, char *regname, int size) {
RAnal *anal = core->anal;
RAnalOp *op = r_core_anal_op (core, addr, R_ANAL_OP_MASK_ESIL);
if (!op) {
return;
}
char *op_esil = strdup (r_strbuf_get (&op->esil));
char *tmp = strchr (op_esil, ',');
if (tmp) {
Expand Down

0 comments on commit a76b965

Please sign in to comment.