changeset 6963:4bf9538ff25e v7.4.799

patch 7.4.799 Problem: Accessing memory before an allocated block. Solution: Check for not going before the start of a pattern. (Dominique Pelle)
author Bram Moolenaar <bram@vim.org>
date Tue, 28 Jul 2015 13:33:45 +0200
parents c622e7e60aa9
children 6c62ad33faf2
files src/fileio.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -8514,7 +8514,7 @@ do_autocmd_event(event, pat, nested, cmd
 	 */
 	brace_level = 0;
 	for (endpat = pat; *endpat && (*endpat != ',' || brace_level
-					     || endpat[-1] == '\\'); ++endpat)
+			   || (endpat > pat && endpat[-1] == '\\')); ++endpat)
 	{
 	    if (*endpat == '{')
 		brace_level++;
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    799,
+/**/
     798,
 /**/
     797,