Fix heap-buffer-overflow in 8051 assembler

This commit is contained in:
GustavoLCR 2019-10-11 14:37:53 -03:00 committed by GitHub
parent a4c145c708
commit 42938ada9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)) {