From 865a28155e7b66a16c4e7bd0b8d1220a3f25375a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 22 Aug 2025 06:28:45 +0800 Subject: [PATCH] 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 --- src/nvim/eval.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 4ec8697c04..683d3b880f 100644 --- 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;