]> git.eshelyaron.com Git - emacs.git/commit
Fix GC-related crashes in styled_format (bug#75754)
authorPip Cet <pipcet@protonmail.com>
Mon, 3 Feb 2025 20:40:34 +0000 (20:40 +0000)
committerEshel Yaron <me@eshelyaron.com>
Sun, 9 Feb 2025 08:02:13 +0000 (09:02 +0100)
commit1dd2bd6a4a93bb5fc857edb4496807823a19f65d
tree006de63724f96dbd816c5c64a396b0ae1df3b579
parent996d076f15909931ede170b2df82a135222217a4
Fix GC-related crashes in styled_format (bug#75754)

This approach ensures we don't use an SSDATA pointer after GC, and
that no Lisp callback code can modify the format string while we're
working on it.

* src/editfns.c (styled_format): Operate on a copy of the format
string rather than the original.  Ensure final NUL byte is copied.

(cherry picked from commit 14ebe4d5dbd4e6637de227c8561aab22cf4b632c)
src/editfns.c