]> granicus.if.org Git - vim/commitdiff
patch 8.1.0426: accessing invalid memory in SmcOpenConnection() v8.1.0426
authorBram Moolenaar <Bram@vim.org>
Sat, 22 Sep 2018 12:08:49 +0000 (14:08 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 22 Sep 2018 12:08:49 +0000 (14:08 +0200)
Problem:    Accessing invalid memory in SmcOpenConnection().
Solution:   Reduce size of errorstring by one. (Dominique Pelle, closes #3469)

src/os_unix.c
src/testdir/test_startup.vim
src/version.c

index bd7b2199619f9a8352cc8a75b372525c7a406f9d..0e2760988b61911daf360b7af116f85505a0079b 100644 (file)
@@ -8032,7 +8032,7 @@ xsmp_init(void)
            &smcallbacks,
            NULL,
            &xsmp.clientid,
-           sizeof(errorstring),
+           sizeof(errorstring) - 1,
            errorstring);
     if (xsmp.smcconn == NULL)
     {
index 4a296ec01356f9d97ec7afbeac486445019f2e4b..6f06ab877e5df12518dd04f5d9832c1dacfea4c1 100644 (file)
@@ -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)
index 22cc075d0003b24724c79c13250b79f5585606f7..480c1abf6916b177df6280f01838d5485939b14c 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    426,
 /**/
     425,
 /**/