]> granicus.if.org Git - vim/commitdiff
patch 8.2.3375: using uninitialized memory v8.2.3375
authorBram Moolenaar <Bram@vim.org>
Wed, 25 Aug 2021 15:31:37 +0000 (17:31 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 25 Aug 2021 15:31:37 +0000 (17:31 +0200)
Problem:    Using uninitialized memory.
Solution:   Initialize textprop_save_len.

src/memline.c
src/version.c

index 2192036ed998f7aa186ea7e1d3924b9e9acc1f13..9fc689f6c5dadfe7f6900f044648f73e3cb9bdd8 100644 (file)
@@ -289,6 +289,7 @@ ml_open(buf_T *buf)
     buf->b_ml.ml_line_lnum = 0;        // no cached line
 #ifdef FEAT_BYTEOFF
     buf->b_ml.ml_chunksize = NULL;
+    buf->b_ml.ml_usedchunks = 0;
 #endif
 
     if (cmdmod.cmod_flags & CMOD_NOSWAPFILE)
@@ -3607,7 +3608,7 @@ ml_delete_int(buf_T *buf, linenr_T lnum, int flags)
     int                ret = FAIL;
 #ifdef FEAT_PROP_POPUP
     char_u     *textprop_save = NULL;
-    int                textprop_save_len;
+    int                textprop_save_len = 0;
 #endif
 
     if (lowest_marked && lowest_marked > lnum)
index 0630ae6f9bbbd412062fd334fbfb59d4b640f406..5211f8faeee3b680744a013ab447a39249f8b548 100644 (file)
@@ -755,6 +755,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3375,
 /**/
     3374,
 /**/