0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.0.0975: using freed memory when setting 'backspace'

Problem:    Using freed memory when setting 'backspace'.
Solution:   When changing oldval also change origval.
This commit is contained in:
Bram Moolenaar
2017-08-20 16:11:51 +02:00
parent 8efa026a25
commit edbc0d46cf
2 changed files with 4 additions and 0 deletions

View File

@@ -4927,6 +4927,8 @@ do_set(
break;
}
vim_free(oldval);
if (origval == oldval)
origval = *(char_u **)varp;
oldval = *(char_u **)varp;
}
/*

View File

@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
975,
/**/
974,
/**/