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 -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202108281030.17SAUbPO3040870%40masaka.moolenaar.net.