commit | 6b9be1b6f29884536d99f7347fb9faa08e642e61 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Jul 28 13:33:45 2015 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Jul 28 13:33:45 2015 +0200 |
tree | 3eaf2d29ef5a343caebc82c9530fe76d1d040fb0 | |
parent | 31b259bf9571cae6408be3ef75d9485e24029be5 [diff] [blame] |
patch 7.4.799 Problem: Accessing memory before an allocated block. Solution: Check for not going before the start of a pattern. (Dominique Pelle)
diff --git a/src/fileio.c b/src/fileio.c index 17b73bf..b1bcfb5 100644 --- a/src/fileio.c +++ b/src/fileio.c
@@ -8514,7 +8514,7 @@ */ brace_level = 0; for (endpat = pat; *endpat && (*endpat != ',' || brace_level - || endpat[-1] == '\\'); ++endpat) + || (endpat > pat && endpat[-1] == '\\')); ++endpat) { if (*endpat == '{') brace_level++;