summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-08-13 20:12:13 +0200
committerBram Moolenaar <Bram@vim.org>2021-08-13 20:12:13 +0200
commit78a9c2e670d29349404b346e0aa90264cab19e9b (patch)
tree5a1b0a7049321c30f7081c49f2faa3d27c6429c5
parentaacc966c5d0ed91e33ed32b08f17cf4df3ca1394 (diff)
downloadvim-git-8.2.3340.tar.gz
patch 8.2.3340: accessing uninitialized pointerv8.2.3340
Problem: Accessing uninitialized pointer. Solution: Set pointer to NULL.
-rw-r--r--src/eval.c2
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index 0dd205887..1fd4765c7 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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())
{
diff --git a/src/version.c b/src/version.c
index 4c1be4ecf..87c315a7c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -756,6 +756,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3340,
+/**/
3339,
/**/
3338,