]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0738: ml_recover() may write beyond block buffer v9.2.0738
authorChristian Brabandt <cb@256bit.org>
Sat, 27 Jun 2026 08:39:43 +0000 (08:39 +0000)
committerChristian Brabandt <cb@256bit.org>
Sat, 27 Jun 2026 08:41:51 +0000 (08:41 +0000)
commit43939cf9ebf5302bb51c85d00ac83de7e01452d5
tree76dc6cfcc6789568f94e5cd7fdbf1591e7f68594
parente876e256fb7da5ff9b722290bffd195d1b30a905
patch 9.2.0738: ml_recover() may write beyond block buffer

Problem:  A crafted swap file can cause an out-of-bounds write during
          recovery when the same block is referenced twice with
          different pe_page_count values (cipher-creator)
Solution: Check hp->bh_page_count against page_count after mf_get() and
          clamp page_count to the actual block size.

closes: #20645

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/memline.c
src/po/vim.pot
src/testdir/samples/recover-mismatch-pc.swp [new file with mode: 0644]
src/testdir/test_recover.vim
src/version.c