From af29d9066927814afde9e7b08d0f02339071815b Mon Sep 17 00:00:00 2001 From: Peter Michael Green Date: Wed, 1 Apr 2020 18:53:42 +0100 Subject: [PATCH] Disable call to SplineFontFree in _MergeFont works around use after free bug (see debian bug 948876) at the cost of probablly causing a memory leak. Gbp-Pq: Name 4000-use-after-free-hack.patch --- fontforge/fvfonts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fontforge/fvfonts.c b/fontforge/fvfonts.c index b54e40e..d276b86 100644 --- a/fontforge/fvfonts.c +++ b/fontforge/fvfonts.c @@ -1157,8 +1157,8 @@ static void _MergeFont(SplineFont *into,SplineFont *other,struct sfmergecontext free(mapping); GlyphHashFree(into); MergeFixupRefChars(into); - if ( other->fv==NULL ) - SplineFontFree(other); +// if ( other->fv==NULL ) +// SplineFontFree(other); into->changed = true; FontViewReformatAll(into); GlyphHashFree(into); -- 2.30.2