]> git.eshelyaron.com Git - emacs.git/commit
Avoid crashes in very large buffers with long lines
authorEli Zaretskii <eliz@gnu.org>
Tue, 6 Aug 2024 18:19:49 +0000 (21:19 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 11 Aug 2024 07:26:55 +0000 (09:26 +0200)
commita9a2d4c5ff42df7c7159cd96ca96dc2146aa1d2e
treee15ea00723d5e8d284998be53a3eda889e8ccf44
parent7f64bfac79e6431271c00f79d5f1445247e801cc
Avoid crashes in very large buffers with long lines

* src/xdisp.c (get_large_narrowing_begv, get_large_narrowing_zv)
(get_medium_narrowing_begv, get_medium_narrowing_zv): Use
'ptrdiff_t' instead of 'int', to prevent integer overflow in
large buffers.  (Bug#72497)

(cherry picked from commit f1e37ae423f3be6224f88a21f30ed40e73a4ce22)
src/xdisp.c