commit | 02ad46394e8f887b60fda994f8a5da2ac1937b23 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sun Jan 12 13:48:18 2020 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Sun Jan 12 13:48:18 2020 +0100 |
tree | 88d500f542feded3c357c2d6c6afc1bdfee2a957 | |
parent | 9b4a15d5dba354d2e1e02871470bad103f34769a [diff] [blame] |
patch 8.2.0112: illegal memory access when using 'cindent' Problem: Illegal memory access when using 'cindent'. Solution: Check for NUL byte. (Dominique Pelle, closes #5470)
diff --git a/src/cindent.c b/src/cindent.c index c7caed6..3dc7b16 100644 --- a/src/cindent.c +++ b/src/cindent.c
@@ -582,6 +582,8 @@ for (s += 4; *s; ++s) { s = cin_skipcomment(s); + if (*s == NUL) + break; if (*s == ':') { if (s[1] == ':') // skip over "::" for C++