diff src/ops.c @ 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 ec1717981acf
children df5778d73320
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);