From: bellard <6490144+bellard@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:15:03 +0000 (+0100) Subject: fixed js_proxy_isArray stack overflow (github issue #178) X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/postgres_fdw.c?a=commitdiff_plain;h=03cc5ecc88f8534a5db5c911df4b712a21d08fb8;p=quickjs.git fixed js_proxy_isArray stack overflow (github issue #178) --- 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;