]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1823: diff: w_topline may be invalidated v9.1.1823
authorYee Cheng Chin <ychin.git@gmail.com>
Sat, 4 Oct 2025 10:26:55 +0000 (10:26 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 4 Oct 2025 10:26:55 +0000 (10:26 +0000)
commitdd9ed46a39df8a8b08ef4b491fdf53bcbfdc0c2d
tree517fdf75666d948615e45565c59bd02b8608ce49
parentae3a8664b3c532e7f17de64b6a049235afe4e0d7
patch 9.1.1823: diff: w_topline may be invalidated

Problem:  diff: w_topline may be invalidated
Solution: Update lnum in diff_set_topline()
          (Yee Cheng Chin).

This can happen in ex_diffupdate() for certain edge cases which cause
the logic to now be wrong. This was also the root cause for #18437 where
Vim would crash due to a null pointer dereferencing (said pointer would
not be null under normal circumstances).

related: #18437
closes: #18484

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/diff.c
src/version.c