Fix heap overflow in long asm lines /via radareorg/cutter#803 ##disasm

This commit is contained in:
a1ext 2018-10-31 00:55:39 +03:00 committed by radare
parent 6ad16dcd8b
commit 0ac6582659

View File

@ -5485,7 +5485,7 @@ R_API int r_core_print_disasm_json(RCore *core, ut64 addr, ut8 *buf, int nb_byte
}
{
char *aop = r_asm_op_get_asm (&asmop);
char *buf = malloc (128);
char *buf = malloc (strlen (aop) + 128);
if (buf) {
strcpy (buf, aop);
r_parse_filter (core->parser, ds->vat, core->flags, buf,