diff src/message.c @ 13188:a49a5419a83f v8.0.1468

patch 8.0.1468: illegal memory access in del_bytes() commit https://github.com/vim/vim/commit/191f18bad0b5c48afa05c3e8a00f3ced993f6a38 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 4 16:38:47 2018 +0100 patch 8.0.1468: illegal memory access in del_bytes() Problem: Illegal memory access in del_bytes(). Solution: Check for negative byte count. (Christian Brabandt, closes https://github.com/vim/vim/issues/2466)
author Christian Brabandt <cb@256bit.org>
date Sun, 04 Feb 2018 16:45:05 +0100
parents 808625d4b71b
children ac42c4b11dbc
line wrap: on
line diff
--- a/src/message.c
+++ b/src/message.c
@@ -761,7 +761,7 @@ emsgn(char_u *s, long n)
     void
 iemsg(char_u *s)
 {
-    msg(s);
+    emsg(s);
 #ifdef ABORT_ON_INTERNAL_ERROR
     abort();
 #endif
@@ -4993,7 +4993,7 @@ vim_vsnprintf_typval(
 			    zero_padding = 0;
 			}
 			else
-                        {
+			{
 			    /* Regular float number */
 			    format[0] = '%';
 			    l = 1;
@@ -5016,7 +5016,7 @@ vim_vsnprintf_typval(
 			    format[l + 1] = NUL;
 
 			    str_arg_l = sprintf(tmp, format, f);
-                        }
+			}
 
 			if (remove_trailing_zeroes)
 			{