Disable call to SplineFontFree in _MergeFont
authorPeter Michael Green <plugwash@raspbian.org>
Wed, 1 Apr 2020 17:53:42 +0000 (18:53 +0100)
committerPeter Michael Green <plugwash@raspbian.org>
Wed, 1 Apr 2020 17:53:42 +0000 (18:53 +0100)
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

index b54e40efadda1d22e88be600d52e761ffaba419c..d276b861bcc7ba643dc66719b958cd50c116627c 100644 (file)
@@ -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);