]> granicus.if.org Git - vim/commitdiff
patch 8.2.2412: not all fields in "cstack" are initialized v8.2.2412
authorBram Moolenaar <Bram@vim.org>
Tue, 26 Jan 2021 18:32:53 +0000 (19:32 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 26 Jan 2021 18:32:53 +0000 (19:32 +0100)
Problem:    Not all fields in "cstack" are initialized which might cause a
            crash.
Solution:   Use CLEAR_FIELD().

src/ex_docmd.c
src/version.c

index 3dec65e88f9541d7b873e57a2f20c1e6695a6a1d..8b9db68123bae4250db4a8d7899453667ce1f3ed 100644 (file)
@@ -696,11 +696,8 @@ do_cmdline(
     ++call_depth;
 
 #ifdef FEAT_EVAL
+    CLEAR_FIELD(cstack);
     cstack.cs_idx = -1;
-    cstack.cs_looplevel = 0;
-    cstack.cs_trylevel = 0;
-    cstack.cs_emsg_silent_list = NULL;
-    cstack.cs_lflags = 0;
     ga_init2(&lines_ga, (int)sizeof(wcmd_T), 10);
 
     real_cookie = getline_cookie(fgetline, cookie);
index 086d79f15ad15cf891067dd5cbe8fd52b9c9750d..9a67633385f276025c50f3f852cdc964aaa1e4b0 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2412,
 /**/
     2411,
 /**/