diff src/tag.c @ 26452:65b4109a4297 v8.2.3756

patch 8.2.3756: might crash when callback is not valid Commit: https://github.com/vim/vim/commit/4dc24eb5adbcc76838fae1e900936dd230209d96 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Tue Dec 7 12:23:57 2021 +0000 patch 8.2.3756: might crash when callback is not valid Problem: might crash when callback is not valid. Solution: Check for valid callback. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/9293)
author Bram Moolenaar <Bram@vim.org>
date Tue, 07 Dec 2021 13:30:05 +0100
parents ef0c07cbf53f
children 08e3eee541ac
line wrap: on
line diff
--- a/src/tag.c
+++ b/src/tag.c
@@ -1361,7 +1361,8 @@ find_tagfunc_tags(
     dict_T	*d;
     taggy_T	*tag = &curwin->w_tagstack[curwin->w_tagstackidx];
 
-    if (*curbuf->b_p_tfu == NUL)
+    if (*curbuf->b_p_tfu == NUL || curbuf->b_tfu_cb.cb_name == NULL
+					   || *curbuf->b_tfu_cb.cb_name == NUL)
 	return FAIL;
 
     args[0].v_type = VAR_STRING;