Patch 8.2.2751
Problem: Coverity warns for using NULL pointer.
Solution: Check for NULL in calling function.
Files: src/userfunc.c
*** ../vim-8.2.2750/src/userfunc.c 2021-04-10 18:21:27.001205481 +0200
--- src/userfunc.c 2021-04-10 21:36:48.728260950 +0200
***************
*** 973,980 ****
garray_T *default_args,
char_u *ret_type)
{
! int evaluate = evalarg != NULL
! && (evalarg->eval_flags & EVAL_EVALUATE);
ufunc_T *ufunc = NULL;
exarg_T eap;
garray_T newlines;
--- 973,979 ----
garray_T *default_args,
char_u *ret_type)
{
! int evaluate = (evalarg->eval_flags & EVAL_EVALUATE);
ufunc_T *ufunc = NULL;
exarg_T eap;
garray_T newlines;
***************
*** 1180,1185 ****
--- 1179,1187 ----
// Recognize "{" as the start of a function body.
if (equal_arrow && **arg == '{')
{
+ if (evalarg == NULL)
+ // cannot happen?
+ goto theend;
if (lambda_function_body(arg, rettv, evalarg, pnewargs,
types_optional ? &argtypes : NULL, varargs,
&default_args, ret_type) == FAIL)
*** ../vim-8.2.2750/src/version.c 2021-04-10 21:01:35.017507340 +0200
--- src/version.c 2021-04-10 21:37:39.756117154 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2751,
/**/
--
>From "know your smileys":
:-{} Too much lipstick
/// 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/202104101939.13AJdfwC283248%40masaka.moolenaar.net.