]> granicus.if.org Git - vim/commitdiff
patch 8.2.3340: accessing uninitialized pointer v8.2.3340
authorBram Moolenaar <Bram@vim.org>
Fri, 13 Aug 2021 18:12:13 +0000 (20:12 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 13 Aug 2021 18:12:13 +0000 (20:12 +0200)
Problem:    Accessing uninitialized pointer.
Solution:   Set pointer to NULL.

src/eval.c
src/version.c

index 0dd2058872da266a93c77a755f0e28f522cde9c3..1fd4765c762618b521be5786c8ff960fecbd90df 100644 (file)
@@ -906,6 +906,7 @@ get_lval(
     {
        // using local variable
        lp->ll_tv = lval_root;
+       v = NULL;
     }
     else
     {
@@ -967,6 +968,7 @@ get_lval(
        }
 
        if (in_vim9script() && lp->ll_valtype == NULL
+               && v != NULL
                && lp->ll_tv == &v->di_tv
                && ht != NULL && ht == get_script_local_ht())
        {
index 4c1be4ecf101d3ce111fafb4cf99fa65b5525b58..87c315a7c83350b5371a34a870ba92b262fdcd59 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3340,
 /**/
     3339,
 /**/