commit 865a28155e7b66a16c4e7bd0b8d1220a3f25375a
parent c522cb0e96dad3bf3a834df5c6a8988f5c13a1a3
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri, 22 Aug 2025 06:28:45 +0800
vim-patch:8.2.1672: v_lock is used when it is not initialized (#35416)
Problem: v_lock is used when it is not initialized. (Yegappan Lakshmanan)
Solution: Initialize the typval in eval1().
https://github.com/vim/vim/commit/4a091b9978122428e7d9154d034c640c9c8d8c13
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
@@ -2655,6 +2655,8 @@ int eval0_simple_funccal(char *arg, typval_T *rettv, exarg_T *eap, evalarg_T *co
/// @return OK or FAIL.
int eval1(char **arg, typval_T *rettv, evalarg_T *const evalarg)
{
+ CLEAR_POINTER(rettv);
+
// Get the first variable.
if (eval2(arg, rettv, evalarg) == FAIL) {
return FAIL;