]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.2.0471: vimvars di_key initialized at runtime v9.2.0471
authorJohn Marriott <basilisk@internode.on.net>
Mon, 11 May 2026 16:22:05 +0000 (16:22 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 11 May 2026 16:22:05 +0000 (16:22 +0000)
commit1b65cfbac5c5bbad108548908e77697111ad4a3f
tree882b0ef96351c91604cb07393317924e5a87c0fb
parent852f4f43caa08ae6a49cab8dcf93b1a0739f6743
patch 9.2.0471: vimvars di_key initialized at runtime

Problem:  evalvars_init() copies each vimvar's name into di_key at
          startup and runtime-checks that the name fits in
          DICTITEM16_KEY_LEN, even though all names are known at
          compile time.
Solution: Embed the name in di_key via the VV_NAME macro so the
          initialization happens at compile time.  Drop the
          runtime length check and the STRCPY loop (John Marriott).

closes: #20185

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/evalvars.c
src/version.c