Permalink
Browse files

patch 8.0.0975: using freed memory when setting 'backspace'

Problem:    Using freed memory when setting 'backspace'.
Solution:   When changing oldval also change origval.
  • Loading branch information...
brammool committed Aug 20, 2017
1 parent 8efa026 commit edbc0d46cffe1766d0b330dc2842212cff644f8e
Showing with 4 additions and 0 deletions.
  1. +2 −0 src/option.c
  2. +2 −0 src/version.c
View
@@ -4927,6 +4927,8 @@ do_set(
break;
}
vim_free(oldval);
if (origval == oldval)
origval = *(char_u **)varp;
oldval = *(char_u **)varp;
}
/*
View
@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
975,
/**/
974,
/**/

0 comments on commit edbc0d4

Please sign in to comment.