summaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-11-02 04:39:38 +0100
committerBram Moolenaar <Bram@vim.org>2013-11-02 04:39:38 +0100
commit1180822670e987ef204dfbf24e55fc09eed89650 (patch)
tree1b127d0583fb4a04d9be8358f3fd222cf48febb3 /src/buffer.c
parentb69a714bb75e25881eb3d4ce116894272535202b (diff)
updated for version 7.4.054v7.4.054
Problem: Reading past end of the 'stl' string. Solution: Don't increment pointer when already at the NUL. (Christian Brabandt)
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 34273d83b5..7b02ddaf57 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4062,7 +4062,8 @@ build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar,
item[curitem].minwid = -syn_namen2id(t, (int)(s - t));
curitem++;
}
- ++s;
+ if (*s != NUL)
+ ++s;
continue;
}