commit | f1551964448607f8222de2d8f0992ea43eb2fe67 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Mar 15 12:55:58 2016 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Mar 15 12:55:58 2016 +0100 |
tree | 965aa22ad570f1ed6dfce1daa1621ba8c714b8b3 | |
parent | 346418c624f1bc7c04c98907134a2b284e6452dd [diff] [blame] |
patch 7.4.1565 Problem: Crash when assert_equal() runs into a NULL string. Solution: Check for NULL. (Dominique) Add a test.
diff --git a/src/eval.c b/src/eval.c index eadb802..425ab68 100644 --- a/src/eval.c +++ b/src/eval.c
@@ -9240,6 +9240,12 @@ char_u *p; char_u buf[NUMBUFLEN]; + if (str == NULL) + { + ga_concat(gap, (char_u *)"NULL"); + return; + } + for (p = str; *p != NUL; ++p) switch (*p) {