diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-01-12 13:48:18 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-01-12 13:48:18 +0100 |
commit | 02ad46394e8f887b60fda994f8a5da2ac1937b23 (patch) | |
tree | 88d500f542feded3c357c2d6c6afc1bdfee2a957 /src/cindent.c | |
parent | 9b4a15d5dba354d2e1e02871470bad103f34769a (diff) |
patch 8.2.0112: illegal memory access when using 'cindent'v8.2.0112
Problem: Illegal memory access when using 'cindent'.
Solution: Check for NUL byte. (Dominique Pelle, closes #5470)
Diffstat (limited to 'src/cindent.c')
-rw-r--r-- | src/cindent.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cindent.c b/src/cindent.c index c7caed68f1..3dc7b16354 100644 --- a/src/cindent.c +++ b/src/cindent.c @@ -582,6 +582,8 @@ cin_iscase( for (s += 4; *s; ++s) { s = cin_skipcomment(s); + if (*s == NUL) + break; if (*s == ':') { if (s[1] == ':') // skip over "::" for C++ |