From 42938ada9fe18d9548ab1dccf7f41df3f23a42a4 Mon Sep 17 00:00:00 2001 From: GustavoLCR Date: Fri, 11 Oct 2019 14:37:53 -0300 Subject: [PATCH] Fix heap-buffer-overflow in 8051 assembler --- libr/asm/arch/8051/8051_ass.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libr/asm/arch/8051/8051_ass.c b/libr/asm/arch/8051/8051_ass.c index a05ea6396c..e5977b1477 100644 --- a/libr/asm/arch/8051/8051_ass.c +++ b/libr/asm/arch/8051/8051_ass.c @@ -1597,7 +1597,6 @@ int assemble_8051(RAsm *a, RAsmOp *op, char const *user_asm) { size_t arglen = strlen (arguments); char *arguments_buf = malloc (arglen + 1); r_str_ncpy (arguments_buf, arguments, arglen + 1); - arguments_buf[arglen + 1] = '\0'; int nargs; parse_mnem_args mnem = mnemonic (user_asm, &nargs); if (!mnem || !n_args_lt(arguments_buf, nargs)) {