commit 5efa4a5fe2e60f3144313b39526a4e8cf8250093
parent 0042242ab09fe284f94fc9fc48630d5ce5e45cb3
Author: bellard <6490144+bellard@users.noreply.github.com>
Date: Fri, 1 Dec 2023 18:15:03 +0100
fixed js_proxy_isArray stack overflow (github issue #178)
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/quickjs/quickjs.c b/quickjs/quickjs.c
@@ -45461,6 +45461,10 @@ static int js_proxy_isArray(JSContext *ctx, JSValueConst obj)
JSProxyData *s = JS_GetOpaque(obj, JS_CLASS_PROXY);
if (!s)
return FALSE;
+ if (js_check_stack_overflow(ctx->rt, 0)) {
+ JS_ThrowStackOverflow(ctx);
+ return -1;
+ }
if (s->is_revoked) {
JS_ThrowTypeErrorRevokedProxy(ctx);
return -1;