mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 15:10:53 +00:00
Fix another UB bug in quickjs
This commit is contained in:
parent
73d0d181e2
commit
b5cbbbc55f
@ -32775,7 +32775,7 @@ static JSValue js_create_function(JSContext *ctx, JSFunctionDef *fd)
|
||||
}
|
||||
} else {
|
||||
b->vardefs = (void *)((uint8_t*)b + vardefs_offset);
|
||||
if (fd->arg_count > 0) {
|
||||
if (fd->vars && fd->arg_count > 0) {
|
||||
memcpy(b->vardefs, fd->args, fd->arg_count * sizeof(fd->args[0]));
|
||||
memcpy(b->vardefs + fd->arg_count, fd->vars, fd->var_count * sizeof(fd->vars[0]));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user