changeset 18062:0b351691071c v8.1.2026

patch 8.1.2026: possibly using uninitialized memory Commit: https://github.com/vim/vim/commit/dbec74907eb614517bcf27116d5aad32e087f241 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 13 22:16:21 2019 +0200 patch 8.1.2026: possibly using uninitialized memory Problem: Possibly using uninitialized memory. Solution: Check if "dict" is NULL. (closes https://github.com/vim/vim/issues/4925)
author Bram Moolenaar <Bram@vim.org>
date Fri, 13 Sep 2019 22:30:03 +0200
parents 93f5d0f8d833
children 168f1eca04a2
files src/ops.c src/version.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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);
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2026,
+/**/
     2025,
 /**/
     2024,