mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-08 08:44:37 +08:00
scr_regex_replace_callback freed its output buffer with free() when the replacer threw after an earlier match had been written, but the buffer is the body of a runtime string, so the process aborted with "free(): invalid pointer" instead of propagating the exception. It now abandons the buffer through scr_jb_abandon, which releases the string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>