0
0
mirror of https://github.com/vim/vim.git synced 2025-11-10 10:47:23 -05:00

patch 9.1.1262: heap-buffer-overflow with narrow 'pummaxwidth' value

Problem:  heap-buffer-overflow occurs with narrow 'pummaxwidth' value
          (after v9.1.1250)
Solution: test that st_end points after st pointer (Hirohito Higashi)

closes: #17005

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Hirohito Higashi
2025-03-30 15:19:05 +02:00
committed by Christian Brabandt
parent c6336acfe3
commit f13c856154
11 changed files with 130 additions and 1 deletions

View File

@@ -845,7 +845,7 @@ pum_redraw(void)
last_char = st_end;
}
if (last_char != NULL)
if (last_char != NULL && st_end > st)
{
if (used_cells < ellipsis_width)
{