0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 9.1.1041: Vim9: out-of-bound access when echoing an enum

Problem:  Vim9: out-of-bound access when echoing an enum
Solution: Add NUL to growarray, check that ufunc is non-null
          before accessing it to make Coverity happy
          (Yegappan Lakshmanan)

closes: #16488

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yegappan Lakshmanan
2025-01-20 21:38:09 +01:00
committed by Christian Brabandt
parent d79ea47079
commit cb848b687f
4 changed files with 19 additions and 1 deletions

View File

@@ -4054,6 +4054,7 @@ object2string(
vim_free(ga.ga_data);
return NULL;
}
ga_append(&ga, NUL);
return (char_u *)ga.ga_data;
}