Mercurial > vim
changeset 31445:85d017b25e20 v9.0.1055
patch 9.0.1055: Coverity warns for using uninitialized memory
Commit: https://github.com/vim/vim/commit/f593fc891c7f6a6735b136878cc13012566ddd71
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Dec 14 13:50:02 2022 +0000
patch 9.0.1055: Coverity warns for using uninitialized memory
Problem: Coverity warns for using uninitialized memory.
Solution: Clear the "lhs" field earlier.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 14 Dec 2022 15:00:05 +0100 |
parents | 4bcbc731d283 |
children | a03b5695e9c5 |
files | src/version.c src/vim9compile.c |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1055, +/**/ 1054, /**/ 1053,
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -2220,6 +2220,7 @@ compile_assignment( char_u *sp; int is_decl = is_decl_command(cmdidx); lhs_T lhs; + CLEAR_FIELD(lhs); long start_lnum = SOURCING_LNUM; int has_arg_is_set_prefix = STRNCMP(arg, "ifargisset ", 11) == 0; @@ -2244,8 +2245,6 @@ compile_assignment( if (p == NULL) return *arg == '[' ? arg : NULL; - lhs.lhs_name = NULL; - if (eap->cmdidx == CMD_increment || eap->cmdidx == CMD_decrement) { if (VIM_ISWHITE(eap->cmd[2]))