commit | 478af67dd6a9adc456464c3736bda328ae3a28cb | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Mon Apr 10 22:22:42 2017 +0200 |
committer | Bram Moolenaar <Bram@vim.org> | Mon Apr 10 22:22:42 2017 +0200 |
tree | cba8ed52ec81c2416324d194c642179536f3e802 | |
parent | 451a4a1cb7797e5d9b9fd625671cb5c652e7da00 [diff] [blame] |
patch 8.0.0561: undefined behavior when using backslash after empty line Problem: Undefined behavior when using backslash after empty line. Solution: Check for an empty line. (Dominique Pelle, closes #1631)
diff --git a/src/misc2.c b/src/misc2.c index 2f9fed5..fa06e47 100644 --- a/src/misc2.c +++ b/src/misc2.c
@@ -2129,7 +2129,7 @@ { int len; - if (s == NULL) + if (s == NULL || *s == NUL) return; len = (int)STRLEN(s); if (ga_grow(gap, len) == OK)