Patch 8.0.0561
Problem:    Undefined behavior when using backslash after empty line.
Solution:   Check for an empty line. (Dominique Pelle, closes #1631)
Files:      src/misc2.c, src/testdir/test_vimscript.vim


*** ../vim-8.0.0560/src/misc2.c 2017-03-29 17:30:23.160136913 +0200
--- src/misc2.c 2017-04-10 22:19:28.426376399 +0200
***************
*** 2129,2135 ****
  {
      int    len;
  
!     if (s == NULL)
        return;
      len = (int)STRLEN(s);
      if (ga_grow(gap, len) == OK)
--- 2129,2135 ----
  {
      int    len;
  
!     if (s == NULL || *s == NUL)
        return;
      len = (int)STRLEN(s);
      if (ga_grow(gap, len) == OK)
*** ../vim-8.0.0560/src/testdir/test_vimscript.vim      2017-03-18 
20:18:42.067950195 +0100
--- src/testdir/test_vimscript.vim      2017-04-10 22:19:28.426376399 +0200
***************
*** 1310,1315 ****
--- 1310,1326 ----
  endfunc
  
  
"-------------------------------------------------------------------------------
+ " Test 96:  line continuation                                             {{{1
+ "
+ "           Undefined behavior was detected by ubsan with line continuation
+ "           after an empty line.
+ 
"-------------------------------------------------------------------------------
+ func Test_script_emty_line_continuation()
+ 
+     \
+ endfunc
+ 
+ 
"-------------------------------------------------------------------------------
  " Modelines                                                               {{{1
  " vim: ts=8 sw=4 tw=80 fdm=marker
  " vim: fdt=substitute(substitute(foldtext(),\ 
'\\%(^+--\\)\\@<=\\(\\s*\\)\\(.\\{-}\\)\:\ \\%(\"\ \\)\\=\\(Test\ 
\\d*\\)\:\\s*',\ '\\3\ (\\2)\:\ \\1',\ \"\"),\ 
'\\(Test\\s*\\)\\(\\d\\)\\D\\@=',\ '\\1\ \\2',\ "")
*** ../vim-8.0.0560/src/version.c       2017-04-10 21:46:33.442970106 +0200
--- src/version.c       2017-04-10 22:20:59.681796145 +0200
***************
*** 766,767 ****
--- 766,769 ----
  {   /* Add new patch number below this line */
+ /**/
+     561,
  /**/

-- 
CONCORDE: Message for you, sir.
   He falls forward revealing the arrow with the note.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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.

Raspunde prin e-mail lui