forked from aniani/vim
patch 8.0.0370: invalid memory access when setting wildchar empty
Problem: Invalid memory access when setting wildchar empty. Solution: Avoid going over the end of the option value. (Dominique Pelle, closes #1509) Make option test check all number options with empty value.
This commit is contained in:
@@ -4612,7 +4612,7 @@ do_set(
|
||||
|| (long *)varp == &p_wcm)
|
||||
&& (*arg == '<'
|
||||
|| *arg == '^'
|
||||
|| ((!arg[1] || vim_iswhite(arg[1]))
|
||||
|| (*arg != NUL && (!arg[1] || vim_iswhite(arg[1]))
|
||||
&& !VIM_ISDIGIT(*arg))))
|
||||
{
|
||||
value = string_to_key(arg);
|
||||
@@ -5843,7 +5843,7 @@ set_string_option(
|
||||
opt_flags)) == NULL)
|
||||
did_set_option(opt_idx, opt_flags, TRUE);
|
||||
|
||||
/* call autocomamnd after handling side effects */
|
||||
/* call autocommand after handling side effects */
|
||||
#if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
|
||||
if (saved_oldval != NULL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user