diff -Nru fontforge-20190801~dfsg/debian/changelog fontforge-20190801~dfsg/debian/changelog --- fontforge-20190801~dfsg/debian/changelog 2020-03-06 03:10:07.000000000 +0000 +++ fontforge-20190801~dfsg/debian/changelog 2020-04-01 17:53:42.000000000 +0000 @@ -1,3 +1,11 @@ +fontforge (1:20190801~dfsg-4+rpi1) bullseye-staging; urgency=medium + + * Disable call to SplineFontFree in _MergeFont to work around use after + free bug (see debian bug 948876). + * Fix clean target. + + -- Peter Michael Green Wed, 01 Apr 2020 17:53:42 +0000 + fontforge (1:20190801~dfsg-4) unstable; urgency=high * Team upload. diff -Nru fontforge-20190801~dfsg/debian/patches/4000-use-after-free-hack.patch fontforge-20190801~dfsg/debian/patches/4000-use-after-free-hack.patch --- fontforge-20190801~dfsg/debian/patches/4000-use-after-free-hack.patch 1970-01-01 00:00:00.000000000 +0000 +++ fontforge-20190801~dfsg/debian/patches/4000-use-after-free-hack.patch 2020-04-01 17:53:42.000000000 +0000 @@ -0,0 +1,20 @@ +Description: 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. +Author: Peter Michael Green + +Index: fontforge-20190801~dfsg/fontforge/fvfonts.c +=================================================================== +--- fontforge-20190801~dfsg.orig/fontforge/fvfonts.c ++++ fontforge-20190801~dfsg/fontforge/fvfonts.c +@@ -1157,8 +1157,8 @@ static void _MergeFont(SplineFont *into, + 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); diff -Nru fontforge-20190801~dfsg/debian/patches/series fontforge-20190801~dfsg/debian/patches/series --- fontforge-20190801~dfsg/debian/patches/series 2020-03-05 17:19:42.000000000 +0000 +++ fontforge-20190801~dfsg/debian/patches/series 2020-04-01 17:53:42.000000000 +0000 @@ -3,3 +3,4 @@ 0003-ignore-osx-files.patch 0004-fix-wrong-xml-tag.patch 3000-debian-bug-952408.patch +4000-use-after-free-hack.patch diff -Nru fontforge-20190801~dfsg/debian/rules fontforge-20190801~dfsg/debian/rules --- fontforge-20190801~dfsg/debian/rules 2020-03-06 00:23:36.000000000 +0000 +++ fontforge-20190801~dfsg/debian/rules 2020-04-01 17:53:42.000000000 +0000 @@ -77,6 +77,7 @@ touch $@ clean:: rm -f debian/stamp-local-shlibs-$(lib) + rm -rf build # track symbols using pkgkde-symbolshelper include /usr/share/pkg-kde-tools/makefiles/1/cdbs/symbolshelper.mk