Prevent stack-overflow in json internalize property (#4877)
This patch fixes #4848. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "ecma-objects-general.h"
|
||||
#include "ecma-objects.h"
|
||||
|
||||
#include "jcontext.h"
|
||||
#include "jrt-libc-includes.h"
|
||||
#include "jrt.h"
|
||||
#include "lit-char-helpers.h"
|
||||
@@ -635,6 +636,8 @@ ecma_builtin_json_internalize_property (ecma_object_t *reviver_p, /**< reviver f
|
||||
JERRY_ASSERT (holder_p);
|
||||
JERRY_ASSERT (name_p);
|
||||
|
||||
ECMA_CHECK_STACK_USAGE ();
|
||||
|
||||
/* 1. */
|
||||
ecma_value_t value = ecma_op_object_get (holder_p, name_p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user