To: vim_dev@googlegroups.com Subject: Patch 8.2.2751 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@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 ///