0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.3340: accessing uninitialized pointer

Problem:    Accessing uninitialized pointer.
Solution:   Set pointer to NULL.
This commit is contained in:
Bram Moolenaar
2021-08-13 20:12:13 +02:00
parent aacc966c5d
commit 78a9c2e670
2 changed files with 4 additions and 0 deletions

View File

@@ -906,6 +906,7 @@ get_lval(
{ {
// using local variable // using local variable
lp->ll_tv = lval_root; lp->ll_tv = lval_root;
v = NULL;
} }
else else
{ {
@@ -967,6 +968,7 @@ get_lval(
} }
if (in_vim9script() && lp->ll_valtype == NULL if (in_vim9script() && lp->ll_valtype == NULL
&& v != NULL
&& lp->ll_tv == &v->di_tv && lp->ll_tv == &v->di_tv
&& ht != NULL && ht == get_script_local_ht()) && ht != NULL && ht == get_script_local_ht())
{ {

View File

@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
3340,
/**/ /**/
3339, 3339,
/**/ /**/