Patch 8.2.0101
Problem:    Crash when passing null object to ":echomsg".
Solution:   Check for NULL pointer. (Yasuhiro Matsumoto, closes #5460)
Files:      src/eval.c, src/testdir/test_messages.vim


*** ../vim-8.2.0100/src/eval.c  2020-01-04 14:32:35.522717984 +0100
--- src/eval.c  2020-01-08 18:55:54.447317092 +0100
***************
*** 5682,5687 ****
--- 5682,5688 ----
  {
      if (varp->v_type == VAR_LIST
            || varp->v_type == VAR_DICT
+           || varp->v_type == VAR_BLOB
            || varp->v_type == VAR_FUNC
            || varp->v_type == VAR_PARTIAL
            || varp->v_type == VAR_FLOAT)
***************
*** 6057,6062 ****
--- 6058,6069 ----
                p = tv_get_string_buf(&rettv, buf);
            else
                p = tv_stringify(&rettv, buf);
+           if (p == NULL)
+           {
+               clear_tv(&rettv);
+               ret = FAIL;
+               break;
+           }
            len = (int)STRLEN(p);
            if (ga_grow(&ga, len + 2) == FAIL)
            {
*** ../vim-8.2.0100/src/testdir/test_messages.vim       2019-12-28 
17:10:42.265008253 +0100
--- src/testdir/test_messages.vim       2020-01-08 18:53:05.915869033 +0100
***************
*** 268,270 ****
--- 268,280 ----
    call term_sendkeys(buf, ':q!')
    call StopVimInTerminal(buf)
  endfunc
+ 
+ func Test_null()
+   echom test_null_list()
+   echom test_null_dict()
+   echom test_null_blob()
+   echom test_null_job()
+   echom test_null_string()
+   echom test_null_channel()
+   echom test_null_partial()
+ endfunc
*** ../vim-8.2.0100/src/version.c       2020-01-07 21:32:15.917239304 +0100
--- src/version.c       2020-01-08 18:54:21.407624434 +0100
***************
*** 744,745 ****
--- 744,747 ----
  {   /* Add new patch number below this line */
+ /**/
+     101,
  /**/

-- 
Biting someone with your natural teeth is "simple assault," while biting
someone with your false teeth is "aggravated assault."
                [real standing law in Louisana, United States of America]

 /// 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202001081756.008HurOs005009%40masaka.moolenaar.net.

Raspunde prin e-mail lui