Skip to content

Commit

Permalink
patch 8.0.0975: using freed memory when setting 'backspace'
Browse files Browse the repository at this point in the history
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 edbc0d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -4927,6 +4927,8 @@ do_set(
break;
}
vim_free(oldval);
if (origval == oldval)
origval = *(char_u **)varp;
oldval = *(char_u **)varp;
}
/*
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
975,
/**/
974,
/**/
Expand Down

0 comments on commit edbc0d4

Please sign in to comment.