diff options
author | Bram Moolenaar <bram@vim.org> | 2015-08-11 15:27:13 +0200 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2015-08-11 15:27:13 +0200 |
commit | fffbf232ed0b961304bac17aeb1baef6f36f9854 (patch) | |
tree | f5a8bed1ce409fae42c627bbf668a2c72b1263b3 | |
parent | 5b46d189f692d476a947ef75a83c02f9942a6956 (diff) | |
download | vim-fffbf232ed0b961304bac17aeb1baef6f36f9854.tar.gz |
Problem: Illegal memory access with "sy match a fold".
Solution: Check for empty string. (Dominique Pelle)
-rw-r--r-- | src/syntax.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/syntax.c b/src/syntax.c index 6900d573..000d5984 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -5654,7 +5654,7 @@ get_syn_pattern(arg, ci) char_u *cpo_save; /* need at least three chars */ - if (arg == NULL || arg[1] == NUL || arg[2] == NUL) + if (arg == NULL || arg[0] == NUL || arg[1] == NUL || arg[2] == NUL) return NULL; end = skip_regexp(arg + 1, *arg, TRUE, NULL); diff --git a/src/version.c b/src/version.c index 862759c1..53fa03dd 100644 --- 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 */ /**/ + 814, +/**/ 813, /**/ 812, |