mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-03 20:22:38 +00:00
Fix ds->opstr leak in ds_build_op_str
This commit is contained in:
parent
77f56015e3
commit
85e3520182
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user