Patch 7.4.1565
Problem: Crash when assert_equal() runs into a NULL string.
Solution: Check for NULL. (Dominique) Add a test.
Files: src/eval.c, src/testdir/test_assert.vim
*** ../vim-7.4.1564/src/eval.c 2016-03-15 12:36:04.413428899 +0100
--- src/eval.c 2016-03-15 12:47:31.078254458 +0100
***************
*** 9240,9245 ****
--- 9240,9251 ----
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)
{
*** ../vim-7.4.1564/src/testdir/test_assert.vim 2016-02-06 20:29:24.357275499
+0100
--- src/testdir/test_assert.vim 2016-03-15 12:52:14.523294018 +0100
***************
*** 48,53 ****
--- 48,68 ----
call assert_equal(type([]), type(verrors))
endfunc
+ func Test_compare_fail()
+ let s:v = {}
+ let s:x = {"a": s:v}
+ let s:v["b"] = s:x
+ let s:w = {"c": s:x, "d": ''}
+ try
+ call assert_equal(s:w, '')
+ catch
+ call assert_exception('E724:')
+ call assert_true(v:errors[0] =~ "Expected NULL but got ''")
+ call remove(v:errors, 0)
+ endtry
+ endfunc
+
+
func Test_user_is_happy()
smile
sleep 300m
*** ../vim-7.4.1564/src/version.c 2016-03-15 12:36:04.417428858 +0100
--- src/version.c 2016-03-15 12:54:49.185678885 +0100
***************
*** 745,746 ****
--- 745,748 ----
{ /* Add new patch number below this line */
+ /**/
+ 1565,
/**/
--
Never overestimate a man's ability to underestimate a woman.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.