patch 8.0.0875: crash with weird command sequence v8.0.0875
authorBram Moolenaar <Bram@vim.org>
Sat, 5 Aug 2017 21:00:53 +0000 (23:00 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 5 Aug 2017 21:00:53 +0000 (23:00 +0200)
Problem:    Crash with weird command sequence. (Dominique Pelle)
Solution:   Use vim_snprintf() instead of STRCPY().

src/misc1.c
src/version.c

index f19c2dc8111639a7d68a962088880ab4a2759c8c..4e51bed25ef9e87851c9ea1a2a34d5418cbb99d5 100644 (file)
@@ -4641,7 +4641,7 @@ home_replace(
      */
     if (buf != NULL && buf->b_help)
     {
-       STRCPY(dst, gettail(src));
+       vim_snprintf((char *)dst, dstlen, "%s", gettail(src));
        return;
     }
 
index bc72c831d185180289b090548a06354494df45d0..da594f762ba0953858fbac90457bc578a56c336a 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    875,
 /**/
     874,
 /**/