mirror of
https://github.com/bellard/quickjs.git
synced 2025-05-15 02:36:17 +08:00
added missing stack overflow check in JSON.stringify()
This commit is contained in:
parent
25aaa77370
commit
dfd9c93ab0
@ -45412,6 +45412,11 @@ static int js_json_to_str(JSContext *ctx, JSONStringifyContext *jsc,
|
|||||||
tab = JS_UNDEFINED;
|
tab = JS_UNDEFINED;
|
||||||
prop = JS_UNDEFINED;
|
prop = JS_UNDEFINED;
|
||||||
|
|
||||||
|
if (js_check_stack_overflow(ctx->rt, 0)) {
|
||||||
|
JS_ThrowStackOverflow(ctx);
|
||||||
|
goto exception;
|
||||||
|
}
|
||||||
|
|
||||||
if (JS_IsObject(val)) {
|
if (JS_IsObject(val)) {
|
||||||
p = JS_VALUE_GET_OBJ(val);
|
p = JS_VALUE_GET_OBJ(val);
|
||||||
cl = p->class_id;
|
cl = p->class_id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user