To: vim_dev@googlegroups.com Subject: Patch 8.1.2105 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2105 Problem: MS-Windows: system() may crash. Solution: Do not use "itmp" when it is NULL. (Yasuhiro Matsumoto, closes #5005) Files: src/ex_cmds.c *** ../vim-8.1.2104/src/ex_cmds.c 2019-09-28 15:51:33.818357228 +0200 --- src/ex_cmds.c 2019-10-01 12:08:00.543675991 +0200 *************** *** 1778,1805 **** } else { ! char_u *p; ! ! /* ! * If there is a pipe, we have to put the '<' in front of it. ! * Don't do this when 'shellquote' is not empty, otherwise the ! * redirection would be inside the quotes. ! */ ! if (*p_shq == NUL) ! { ! p = find_pipe(buf); ! if (p != NULL) ! *p = NUL; ! } ! STRCAT(buf, " <"); /* " < " causes problems on Amiga */ ! STRCAT(buf, itmp); ! if (*p_shq == NUL) { ! p = find_pipe(cmd); ! if (p != NULL) { ! STRCAT(buf, " "); /* insert a space before the '|' for DOS */ ! STRCAT(buf, p); } } } --- 1778,1807 ---- } else { ! STRCPY(buf, cmd); ! if (itmp != NULL) { ! char_u *p; ! ! // If there is a pipe, we have to put the '<' in front of it. ! // Don't do this when 'shellquote' is not empty, otherwise the ! // redirection would be inside the quotes. ! if (*p_shq == NUL) ! { ! p = find_pipe(buf); ! if (p != NULL) ! *p = NUL; ! } ! STRCAT(buf, " <"); // " < " causes problems on Amiga ! STRCAT(buf, itmp); ! if (*p_shq == NUL) { ! p = find_pipe(cmd); ! if (p != NULL) ! { ! STRCAT(buf, " "); // insert a space before the '|' for DOS ! STRCAT(buf, p); ! } } } } *** ../vim-8.1.2104/src/version.c 2019-09-30 23:12:10.874289153 +0200 --- src/version.c 2019-10-01 12:10:14.219181842 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 2105, /**/ -- -rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed -rwxr-xr-t 4 root 131720 Jan 1 1970 /usr/ucb/vi -rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs /// Bram Moolenaar -- Bram@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 ///