From: Bram Moolenaar Date: Sun, 20 Aug 2017 14:11:51 +0000 (+0200) Subject: patch 8.0.0975: using freed memory when setting 'backspace' X-Git-Tag: v8.0.0975 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=edbc0d46cffe1766d0b330dc2842212cff644f8e;p=vim patch 8.0.0975: using freed memory when setting 'backspace' Problem: Using freed memory when setting 'backspace'. Solution: When changing oldval also change origval. --- diff --git a/src/option.c b/src/option.c index 48106411f..61d357983 100644 --- a/src/option.c +++ b/src/option.c @@ -4927,6 +4927,8 @@ do_set( break; } vim_free(oldval); + if (origval == oldval) + origval = *(char_u **)varp; oldval = *(char_u **)varp; } /* diff --git a/src/version.c b/src/version.c index d5df16153..36af20968 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 975, /**/ 974, /**/