Skip to content

Commit

Permalink
Fix ds->opstr leak in ds_build_op_str
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazula authored and pull[bot] committed Jun 14, 2023
1 parent 822b6de commit 7927677
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libr/core/disasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,7 @@ static void ds_build_op_str(RDisasmState *ds, bool print_color) {
ds->opstr = strdup (ds->str);
char *asm_str = colorize_asm_string (core, ds, print_color);
if (asm_str) {
free (ds->opstr);
ds->opstr = asm_str;
r_str_ncpy (ds->str, asm_str, sizeof (ds->str));
// strcpy (ds->str, asm_str);
Expand Down

0 comments on commit 7927677

Please sign in to comment.