From: Fabrice Bellard Date: Sat, 21 Nov 2026 12:22:40 +0000 (+0100) Subject: don't append in place to strings that are atoms (bnoordhuis) X-Git-Url: https://git.kaiwu.me/http/ngx_http_proxy_module.html?a=commitdiff_plain;h=b50e8fc08e13bb8692d3ae2a39506c67fe58f3ef;p=quickjs.git don't append in place to strings that are atoms (bnoordhuis) --- diff --git a/quickjs.c b/quickjs.c index 4b9ba1b..55ffcbc 100644 --- a/quickjs.c +++ b/quickjs.c @@ -4793,7 +4793,7 @@ static BOOL JS_ConcatStringInPlace(JSContext *ctx, JSString *p1, JSValueConst op if (p2->len == 0) return TRUE; - if (js_rc(p1)->ref_count != 1) + if (js_rc(p1)->ref_count != 1 || p1->atom_type != 0) return FALSE; size1 = js_malloc_usable_size(ctx, p1); if (p1->is_wide_char) {