Fix a few issues which can lead to undefined-behaviour (#1730)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
+2
-1
@@ -2754,7 +2754,8 @@ vm_run (const ecma_compiled_code_t *bytecode_header_p, /**< byte-code data heade
|
||||
frame_ctx.is_eval_code = is_eval_code;
|
||||
frame_ctx.call_operation = VM_NO_EXEC_OP;
|
||||
|
||||
ecma_value_t stack[call_stack_size];
|
||||
/* Use JERRY_MAX() to avoid array declaration with size 0. */
|
||||
ecma_value_t stack[JERRY_MAX (call_stack_size, 1)];
|
||||
frame_ctx.registers_p = stack;
|
||||
|
||||
return vm_execute (&frame_ctx, arg_list_p, arg_list_len);
|
||||
|
||||
Reference in New Issue
Block a user