From: Fabrice Bellard Date: Sat, 21 Nov 2026 13:32:04 +0000 (+0100) Subject: Check for stack overflow in JS_IteratorNext fast path (josefguenther) X-Git-Url: https://git.kaiwu.me/http/ngx_http_proxy_module.html?a=commitdiff_plain;h=d28175ab5f7519bce34bc82e2e2a7143d4e78990;p=quickjs.git Check for stack overflow in JS_IteratorNext fast path (josefguenther) --- diff --git a/quickjs.c b/quickjs.c index 9983a62..535ebcc 100644 --- a/quickjs.c +++ b/quickjs.c @@ -16980,6 +16980,10 @@ static JSValue JS_IteratorNext3(JSContext *ctx, JSValueConst enum_obj, JSCFunctionType func; JSValueConst args[1]; + if (js_check_stack_overflow(ctx->rt, 0)) { + JS_ThrowStackOverflow(ctx); + goto fail; + } /* in case the function expects one argument */ if (argc == 0) { args[0] = JS_UNDEFINED;