Patch 8.2.3379

5 views
Skip to first unread message

Bram Moolenaar

unread,
Aug 28, 2021, 6:30:46 AM8/28/21
to vim...@googlegroups.com

Patch 8.2.3379
Problem: Crash when using NULL job.
Solution: Copy static string into buffer. (issue #8260)
Files: src/job.c, src/testdir/test_channel.vim


*** ../vim-8.2.3378/src/job.c 2021-08-09 19:59:01.442811242 +0200
--- src/job.c 2021-08-28 12:25:45.581950175 +0200
***************
*** 1983,1989 ****
char *status;

if (job == NULL)
! return (char_u *)"no process";
status = job->jv_status == JOB_FAILED ? "fail"
: job->jv_status >= JOB_ENDED ? "dead"
: "run";
--- 1983,1992 ----
char *status;

if (job == NULL)
! {
! vim_snprintf((char *)buf, NUMBUFLEN, "no process");
! return buf;
! }
status = job->jv_status == JOB_FAILED ? "fail"
: job->jv_status >= JOB_ENDED ? "dead"
: "run";
*** ../vim-8.2.3378/src/testdir/test_channel.vim 2021-08-04 20:54:52.297882068 +0200
--- src/testdir/test_channel.vim 2021-08-28 12:28:50.801314706 +0200
***************
*** 1718,1723 ****
--- 1718,1727 ----
endtry
endfunc

+ func Test_null_job_eval()
+ call assert_fails('eval test_null_job()->eval()', 'E121:')
+ endfunc
+
" This was leaking memory.
func Test_partial_in_channel_cycle()
let d = {}
*** ../vim-8.2.3378/src/version.c 2021-08-27 20:59:31.541835086 +0200
--- src/version.c 2021-08-28 12:29:17.605222764 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3379,
/**/

--
ARTHUR: Old woman!
DENNIS: Man!
ARTHUR: Man. I'm sorry. Old man, What knight live in that castle over there?
DENNIS: I'm thirty-seven.
"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/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages