]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.0.2110: [security]: overflow in ex address parsing v9.0.2110
authorChristian Brabandt <cb@256bit.org>
Tue, 14 Nov 2023 20:33:29 +0000 (21:33 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 16 Nov 2023 21:04:38 +0000 (22:04 +0100)
commit060623e4a3bc72b011e7cd92bedb3bfb64e06200
tree10d957de477543bcf11d3973dabc0a62f1981520
parent58f9befca1fa172068effad7f2ea5a9d6a7b0cca
patch 9.0.2110: [security]: overflow in ex address parsing

Problem:  [security]: overflow in ex address parsing
Solution: Verify that lnum is positive, before substracting from
          LONG_MAX

[security]: overflow in ex address parsing

When parsing relative ex addresses one may unintentionally cause an
overflow (because LONG_MAX - lnum will overflow for negative addresses).

So verify that lnum is actually positive before doing the overflow
check.

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/ex_docmd.c
src/testdir/test_excmd.vim
src/version.c