]> granicus.if.org Git - vim/commitdiff
patch 8.2.3929: using unititialized variable v8.2.3929
authorBram Moolenaar <Bram@vim.org>
Tue, 28 Dec 2021 20:53:30 +0000 (20:53 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 28 Dec 2021 20:53:30 +0000 (20:53 +0000)
Problem:    Using unititialized variable.
Solution:   Set the option flags to zero for a terminal option.

src/option.c
src/version.c

index 9d596e41ca9a2da0c3da73e730aec5a43e3f684b..2aab253eb01a499186a51e1d609e97f541110b0a 100644 (file)
@@ -3962,6 +3962,9 @@ get_option_value(
            char_u key_name[2];
            char_u *p;
 
+           if (flagsp != NULL)
+               *flagsp = 0;  // terminal option has no flags
+
            // check for a terminal option
            if (key < 0)
            {
index 1dedcfecbb1e5bbfc81efd3bd37f840198de0369..505d3f1430003547421f46affe47a1ab85ed9592 100644 (file)
@@ -749,6 +749,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3929,
 /**/
     3928,
 /**/