Skip to content

Commit ecd493d

Browse files
committed
Fix #24155 - asmop.mnemonic can be null ##crash
1 parent dfe3eea commit ecd493d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libr/core/disasm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -7515,7 +7515,7 @@ R_IPI int r_core_print_disasm_json_ipi(RCore *core, ut64 addr, ut8 *buf, int nb_
75157515
continue;
75167516
}
75177517

7518-
char *opstr = strdup (asmop.mnemonic);
7518+
char *opstr = strdup (asmop.mnemonic? asmop.mnemonic: "");
75197519
core->rasm->pseudo = opseudo;
75207520

75217521
ds->has_description = false;
@@ -7557,7 +7557,7 @@ R_IPI int r_core_print_disasm_json_ipi(RCore *core, ut64 addr, ut8 *buf, int nb_
75577557
core->rasm->parse->subrel_addr = killme;
75587558
}
75597559
}
7560-
char *disasm = strdup (asmop.mnemonic);
7560+
char *disasm = strdup (asmop.mnemonic? asmop.mnemonic: "");
75617561
{
75627562
char *buf = ds_sub_jumps (ds, disasm);
75637563
if (buf) {

0 commit comments

Comments
 (0)