Mercurial > vim
comparison src/dict.c @ 25743:925ffa1eeb08 v8.2.3407
patch 8.2.3407: using uninitialized memory with "let g:['bar'] = 2"
Commit: https://github.com/vim/vim/commit/3b318513561b5862944769188ae4af6b70311838
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Sep 6 19:19:45 2021 +0200
patch 8.2.3407: using uninitialized memory with "let g:['bar'] = 2"
Problem: Using uninitialized memory with "let g:['bar'] = 2".
Solution: Initialize v_type of a new dict item.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 06 Sep 2021 19:30:03 +0200 |
parents | 0fdacd8f0cf3 |
children | 14b4c778b61e |
comparison
equal
deleted
inserted
replaced
25742:5399a1d88e0a | 25743:925ffa1eeb08 |
---|---|
227 if (di != NULL) | 227 if (di != NULL) |
228 { | 228 { |
229 STRCPY(di->di_key, key); | 229 STRCPY(di->di_key, key); |
230 di->di_flags = DI_FLAGS_ALLOC; | 230 di->di_flags = DI_FLAGS_ALLOC; |
231 di->di_tv.v_lock = 0; | 231 di->di_tv.v_lock = 0; |
232 di->di_tv.v_type = VAR_UNKNOWN; | |
232 } | 233 } |
233 return di; | 234 return di; |
234 } | 235 } |
235 | 236 |
236 /* | 237 /* |