mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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 #9293)
This commit is contained in:
committed by
Bram Moolenaar
parent
92c33eb273
commit
4dc24eb5ad
@@ -7210,7 +7210,7 @@ option_set_callback_func(char_u *optval UNUSED, callback_T *optcb UNUSED)
|
||||
return FAIL;
|
||||
|
||||
cb = get_callback(tv);
|
||||
if (cb.cb_name == NULL)
|
||||
if (cb.cb_name == NULL || *cb.cb_name == NUL)
|
||||
{
|
||||
free_tv(tv);
|
||||
return FAIL;
|
||||
|
Reference in New Issue
Block a user