]> granicus.if.org Git - vim/commitdiff
patch 8.1.2026: possibly using uninitialized memory v8.1.2026
authorBram Moolenaar <Bram@vim.org>
Fri, 13 Sep 2019 20:16:21 +0000 (22:16 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 13 Sep 2019 20:16:21 +0000 (22:16 +0200)
Problem:    Possibly using uninitialized memory.
Solution:   Check if "dict" is NULL. (closes #4925)

src/ops.c
src/version.c

index 7b1d9ede7aa32ac80934feaef7093012df83c3e4..5f0181ba5a59fedd32c2774f5336c905ec404747 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -7074,12 +7074,12 @@ cursor_pos_info(dict_T *dict)
        }
 
        bom_count = bomb_size();
-       if (bom_count > 0)
+       if (dict == NULL && bom_count > 0)
            vim_snprintf((char *)IObuff + STRLEN(IObuff), IOSIZE,
                                 _("(+%lld for BOM)"), (long_long_T)bom_count);
        if (dict == NULL)
        {
-           /* Don't shorten this message, the user asked for it. */
+           // Don't shorten this message, the user asked for it.
            p = p_shm;
            p_shm = (char_u *)"";
            msg((char *)IObuff);
index f412732ca4feda94af606df7992c491d8da89a1e..c15abcbbe89995baa57a143d86f4715ea40ea962 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2026,
 /**/
     2025,
 /**/