File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -557,6 +557,8 @@ ex_args(exarg_T *eap)
557557
558558 if (eap -> cmdidx != CMD_args )
559559 {
560+ if (check_arglist_locked () == FAIL )
561+ return ;
560562 alist_unlink (ALIST (curwin ));
561563 if (eap -> cmdidx == CMD_argglobal )
562564 ALIST (curwin ) = & global_alist ;
@@ -566,6 +568,8 @@ ex_args(exarg_T *eap)
566568
567569 if (* eap -> arg != NUL )
568570 {
571+ if (check_arglist_locked () == FAIL )
572+ return ;
569573 // ":args file ..": define new argument list, handle like ":next"
570574 // Also for ":argslocal file .." and ":argsglobal file ..".
571575 ex_next (eap );
Original file line number Diff line number Diff line change @@ -2717,4 +2717,13 @@ func Test_close_autocmd_tab()
27172717 % bwipe!
27182718endfunc
27192719
2720+ " This was using freed memory.
2721+ func Test_BufNew_arglocal ()
2722+ arglocal
2723+ au BufNew * arglocal
2724+ call assert_fails (' drop xx' , ' E1156:' )
2725+
2726+ au ! BufNew
2727+ endfunc
2728+
27202729" vim: shiftwidth = 2 sts = 2 expandtab
Original file line number Diff line number Diff line change @@ -750,6 +750,8 @@ static char *(features[]) =
750750
751751static int included_patches [] =
752752{ /* Add new patch number below this line */
753+ /**/
754+ 2463 ,
753755/**/
754756 2462 ,
755757/**/
You can’t perform that action at this time.
0 commit comments