Mercurial > vim
diff src/insexpand.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 | 8aba638e91eb |
children | 13ba00ef7687 |
line wrap: on
line diff
--- a/src/insexpand.c +++ b/src/insexpand.c @@ -2329,14 +2329,12 @@ set_thesaurusfunc_option(void) if (*curbuf->b_p_tsrfu != NUL) { // buffer-local option set - free_callback(&curbuf->b_tsrfu_cb); retval = option_set_callback_func(curbuf->b_p_tsrfu, &curbuf->b_tsrfu_cb); } else { // global option set - free_callback(&tsrfu_cb); retval = option_set_callback_func(p_tsrfu, &tsrfu_cb); }