Patch 8.1.2061

10 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 20, 2019, 11:21:08 AM9/20/19
to vim...@googlegroups.com

Patch 8.1.2061
Problem: MS-Windows GUI: ":sh" crashes when trying to use a terminal.
Solution: Check for a NULL command. (Yasuhiro Matsumoto, closes #4958)
Files: src/os_win32.c


*** ../vim-8.1.2060/src/os_win32.c 2019-09-13 22:30:07.588524105 +0200
--- src/os_win32.c 2019-09-20 17:16:35.486558014 +0200
***************
*** 4657,4668 ****
{
char_u *cmdbase = cmd;

! // Skip a leading quote and (.
! while (*cmdbase == '"' || *cmdbase == '(')
! ++cmdbase;

// Check the command does not begin with "start "
! if (STRNICMP(cmdbase, "start", 5) != 0 || !VIM_ISWHITE(cmdbase[5]))
{
// Use a terminal window to run the command in.
x = mch_call_shell_terminal(cmd, options);
--- 4657,4670 ----
{
char_u *cmdbase = cmd;

! if (cmdbase != NULL)
! // Skip a leading quote and (.
! while (*cmdbase == '"' || *cmdbase == '(')
! ++cmdbase;

// Check the command does not begin with "start "
! if (cmdbase == NULL
! || STRNICMP(cmdbase, "start", 5) != 0 || !VIM_ISWHITE(cmdbase[5]))
{
// Use a terminal window to run the command in.
x = mch_call_shell_terminal(cmd, options);
*** ../vim-8.1.2060/src/version.c 2019-09-20 17:00:05.443834632 +0200
--- src/version.c 2019-09-20 17:18:52.273855662 +0200
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 2061,
/**/

--
TALL KNIGHT OF NI: Ni!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages