Tighten string length bounds and propagate invalid jv in implode
The bound added in CVE-2026-32316 (e47e56d22) still allowed `sizeof(jvp_string) + (currlen + len) * 2 + 1` to wrap `size_t` on 32-bit platforms. Tighten the threshold so the final allocation fits in 32-bit `size_t`. Also break out of `jv_string_implode` and `f_string_implode` once `jv_string_append_codepoint` returns an invalid `jv`; otherwise the next iteration triggers the assertion in `jvp_string_ptr` (or invokes undefined behavior under `-DNDEBUG`). Fixes CVE-2026-54679. Co-authored-by: Dirk Müller <dirk@dmllr.de>
I
itchyny committed
46d1da30944ce93dd671ac72b6513fc0eb747837
Parent: e987df0