]> granicus.if.org Git - vim/commitdiff
patch 7.4.811 v7.4.811
authorBram Moolenaar <Bram@vim.org>
Tue, 4 Aug 2015 20:02:51 +0000 (22:02 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 4 Aug 2015 20:02:51 +0000 (22:02 +0200)
Problem:    Invalid memory access when using "exe 'sc'".
Solution:   Avoid going over the end of the string. (Dominique Pelle)

src/ex_docmd.c
src/version.c

index 2512757598bb58242d34a86c791fd75874a7d0ec..13ed6b0a1d638708a4a8ba57f57f194359e8658d 100644 (file)
@@ -3129,8 +3129,8 @@ find_command(eap, full)
        ++p;
     }
     else if (p[0] == 's'
-           && ((p[1] == 'c' && p[2] != 's' && p[2] != 'r'
-                                               && p[3] != 'i' && p[4] != 'p')
+           && ((p[1] == 'c' && (p[2] == NUL || (p[2] != 's' && p[2] != 'r'
+                       && (p[3] == NUL || (p[3] != 'i' && p[4] != 'p')))))
                || p[1] == 'g'
                || (p[1] == 'i' && p[2] != 'm' && p[2] != 'l' && p[2] != 'g')
                || p[1] == 'I'
index 7ad08d2f48b2ddf9309d8f0932822505fab3740e..6546f6a01661883fd3ff811bc6a72b2d794fa627 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    811,
 /**/
     810,
 /**/