changeset 14828:421e120ffb30 v8.1.0426

patch 8.1.0426: accessing invalid memory in SmcOpenConnection() commit https://github.com/vim/vim/commit/4841a7ccaed57f723016656e9683b587ac91f621 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 22 14:08:49 2018 +0200 patch 8.1.0426: accessing invalid memory in SmcOpenConnection() Problem: Accessing invalid memory in SmcOpenConnection(). Solution: Reduce size of errorstring by one. (Dominique Pelle, closes https://github.com/vim/vim/issues/3469)
author Christian Brabandt <cb@256bit.org>
date Sat, 22 Sep 2018 14:15:05 +0200
parents 56b71e259a61
children 550ac2202b84
files src/os_unix.c src/testdir/test_startup.vim src/version.c
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -8032,7 +8032,7 @@ xsmp_init(void)
 	    &smcallbacks,
 	    NULL,
 	    &xsmp.clientid,
-	    sizeof(errorstring),
+	    sizeof(errorstring) - 1,
 	    errorstring);
     if (xsmp.smcconn == NULL)
     {
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -272,7 +272,7 @@ endfunc
 " Test the -V[N]{filename} argument to set the 'verbose' option to N
 " and set 'verbosefile' to filename.
 func Test_V_file_arg()
-  if RunVim([], [], ' --clean -X -V2Xverbosefile -c "set verbose? verbosefile?" -cq')
+  if RunVim([], [], ' --clean -V2Xverbosefile -c "set verbose? verbosefile?" -cq')
     let out = join(readfile('Xverbosefile'), "\n")
     call assert_match("sourcing \"$VIMRUNTIME[\\/]defaults\.vim\"\n", out)
     call assert_match("\n  verbose=2\n", out)
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    426,
+/**/
     425,
 /**/
     424,