summaryrefslogtreecommitdiff
path: root/quickjs.c
diff options
context:
space:
mode:
authorbellard <6490144+bellard@users.noreply.github.com>2023-12-01 18:15:03 +0100
committerbellard <6490144+bellard@users.noreply.github.com>2023-12-01 18:15:03 +0100
commit03cc5ecc88f8534a5db5c911df4b712a21d08fb8 (patch)
tree66414741aa538cbdbc08ae5073dae19a21d6304e /quickjs.c
parent6de52d878ae8ee06e4a59cbd2e77d84704c9f602 (diff)
downloadquickjs-03cc5ecc88f8534a5db5c911df4b712a21d08fb8.tar.gz
quickjs-03cc5ecc88f8534a5db5c911df4b712a21d08fb8.zip
fixed js_proxy_isArray stack overflow (github issue #178)
Diffstat (limited to 'quickjs.c')
-rw-r--r--quickjs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/quickjs.c b/quickjs.c
index 7916013..113c447 100644
--- a/quickjs.c
+++ b/quickjs.c
@@ -45243,6 +45243,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;