From: Fabrice Bellard Date: Sat, 21 Nov 2026 13:37:44 +0000 (+0100) Subject: Check the stack when instanceof follows a bound function X-Git-Url: https://git.kaiwu.me/http/ngx_http_proxy_module.html?a=commitdiff_plain;h=557d8437d67f3c7b7ea391ded6b26900750fdbae;p=quickjs.git Check the stack when instanceof follows a bound function --- diff --git a/quickjs.c b/quickjs.c index 535ebcc..dd83cc9 100644 --- a/quickjs.c +++ b/quickjs.c @@ -8206,6 +8206,10 @@ int JS_OrdinaryIsInstanceOf(JSContext *ctx, JSValueConst val, p = JS_VALUE_GET_OBJ(obj); if (p->class_id == JS_CLASS_BOUND_FUNCTION) { JSBoundFunction *s = p->u.bound_function; + if (js_check_stack_overflow(ctx->rt, 0)) { + JS_ThrowStackOverflow(ctx); + return -1; + } return JS_IsInstanceOf(ctx, val, s->func_obj); }