]> git.eshelyaron.com Git - emacs.git/commit
Prevent buffer overflow in line-numbering code
authorEli Zaretskii <eliz@gnu.org>
Sat, 15 Feb 2025 11:15:36 +0000 (13:15 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 15 Feb 2025 19:31:55 +0000 (20:31 +0100)
commit94edcde8a430e392d881b1c9f463bb4949be7b20
tree2bbf09aefc8a958ce65d56791ff46e319f9e929f
parent08e4a0d887ddcdc9d6416b015ceb6316fe0912e9
Prevent buffer overflow in line-numbering code

* src/xdisp.c (maybe_produce_line_number): Limit the value of
'display-line-numbers-width' to what can be shown in the window,
and set dimension of the lnum_buf[] accordingly.  (Bug#75969)

(cherry picked from commit 0f768b8843bcdbbfa1c64aeee64d2de7d62c0d13)
src/xdisp.c