Patch 8.0.0703
Problem:    Illegal memory access with empty :doau command.
Solution:   Check the event for being out of range. (James McCoy)
Files:      src/testdir/test_autocmd.vim, src/fileio.c


*** ../vim-8.0.0702/src/testdir/test_autocmd.vim        2017-03-21 
15:50:03.713154799 +0100
--- src/testdir/test_autocmd.vim        2017-07-09 10:53:33.531304923 +0200
***************
*** 418,420 ****
--- 418,424 ----
      call delete(file)
    endfor
  endfunc
+ 
+ func Test_empty_doau()
+   doau \|
+ endfunc
*** ../vim-8.0.0702/src/fileio.c        2017-06-27 22:11:36.131082741 +0200
--- src/fileio.c        2017-07-09 11:01:16.071751294 +0200
***************
*** 8863,8869 ****
      /*
       * Loop over the events.
       */
!     while (*arg && !VIM_ISWHITE(*arg))
        if (apply_autocmds_group(event_name2nr(arg, &arg),
                                      fname, NULL, TRUE, group, curbuf, NULL))
            nothing_done = FALSE;
--- 8863,8869 ----
      /*
       * Loop over the events.
       */
!     while (*arg && !ends_excmd(*arg) && !VIM_ISWHITE(*arg))
        if (apply_autocmds_group(event_name2nr(arg, &arg),
                                      fname, NULL, TRUE, group, curbuf, NULL))
            nothing_done = FALSE;
***************
*** 9385,9391 ****
       * Quickly return if there are no autocommands for this event or
       * autocommands are blocked.
       */
!     if (first_autopat[(int)event] == NULL || autocmd_blocked > 0)
        goto BYPASS_AU;
  
      /*
--- 9385,9392 ----
       * Quickly return if there are no autocommands for this event or
       * autocommands are blocked.
       */
!     if (event == NUM_EVENTS || first_autopat[(int)event] == NULL
!           || autocmd_blocked > 0)
        goto BYPASS_AU;
  
      /*
***************
*** 9458,9464 ****
      {
        if (event == EVENT_COLORSCHEME || event == EVENT_OPTIONSET)
            autocmd_fname = NULL;
!       else if (fname != NULL && *fname != NUL)
            autocmd_fname = fname;
        else if (buf != NULL)
            autocmd_fname = buf->b_ffname;
--- 9459,9465 ----
      {
        if (event == EVENT_COLORSCHEME || event == EVENT_OPTIONSET)
            autocmd_fname = NULL;
!       else if (fname != NULL && !ends_excmd(*fname))
            autocmd_fname = fname;
        else if (buf != NULL)
            autocmd_fname = buf->b_ffname;
*** ../vim-8.0.0702/src/version.c       2017-07-08 22:37:02.023229159 +0200
--- src/version.c       2017-07-09 11:05:33.169741329 +0200
***************
*** 766,767 ****
--- 766,769 ----
  {   /* Add new patch number below this line */
+ /**/
+     703,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
130. You can't get out of your desk even if it's time to eat or time
     to go to the bathroom.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui