Skip to content

Commit 64a82e2

Browse files
committed
Fix UAF in aaef ##crash
* Reported by @hdthky * Reproducer: uaf-aef * BountyID: e98ad92c-3a64-48fb-84d4-d13afdbcbdd7
1 parent 6d5628c commit 64a82e2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: libr/core/canal.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -5295,10 +5295,6 @@ R_API void r_core_anal_esil(RCore *core, const char *str, const char *target) {
52955295
arch = R2_ARCH_MIPS;
52965296
}
52975297

5298-
const char *sn = r_reg_get_name (core->anal->reg, R_REG_NAME_SN);
5299-
if (!sn) {
5300-
eprintf ("Warning: No SN reg alias for current architecture.\n");
5301-
}
53025298
r_reg_arena_push (core->anal->reg);
53035299

53045300
IterCtx ictx = { start, end, fcn, NULL };
@@ -5409,6 +5405,10 @@ R_API void r_core_anal_esil(RCore *core, const char *str, const char *target) {
54095405
goto repeat;
54105406
}
54115407
}
5408+
const char *sn = r_reg_get_name (core->anal->reg, R_REG_NAME_SN);
5409+
if (!sn) {
5410+
eprintf ("Warning: No SN reg alias for current architecture.\n");
5411+
}
54125412
if (sn && op.type == R_ANAL_OP_TYPE_SWI) {
54135413
r_strf_buffer (64);
54145414
r_flag_space_set (core->flags, R_FLAGS_FS_SYSCALLS);

0 commit comments

Comments
 (0)