diff -Nru fontforge-20220308~dfsg/debian/changelog fontforge-20220308~dfsg/debian/changelog --- fontforge-20220308~dfsg/debian/changelog 2022-06-16 10:08:43.000000000 +0000 +++ fontforge-20220308~dfsg/debian/changelog 2022-06-21 12:15:06.000000000 +0000 @@ -1,3 +1,12 @@ +fontforge (1:20220308~dfsg-1+rpi1) bookworm-staging; urgency=medium + + [changes brought forward from 1:20190801~dfsg-4+rpi1 by Peter Michael Green at Wed, 01 Apr 2020 17:53:42 +0000] + * Disable call to SplineFontFree in _MergeFont to work around use after + free bug (see debian bug 948876). + * Fix clean target. + + -- Raspbian forward porter Tue, 21 Jun 2022 12:15:06 +0000 + fontforge (1:20220308~dfsg-1) unstable; urgency=medium [ Boyuan Yang ] diff -Nru fontforge-20220308~dfsg/debian/patches/4000-use-after-free-hack.patch fontforge-20220308~dfsg/debian/patches/4000-use-after-free-hack.patch --- fontforge-20220308~dfsg/debian/patches/4000-use-after-free-hack.patch 1970-01-01 00:00:00.000000000 +0000 +++ fontforge-20220308~dfsg/debian/patches/4000-use-after-free-hack.patch 2022-06-21 12:15:06.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-20220308~dfsg/debian/patches/series fontforge-20220308~dfsg/debian/patches/series --- fontforge-20220308~dfsg/debian/patches/series 2022-06-16 08:50:45.000000000 +0000 +++ fontforge-20220308~dfsg/debian/patches/series 2022-06-21 12:15:06.000000000 +0000 @@ -5,3 +5,4 @@ 0005-hurd-undef-extended-temporarily.patch 2003_avoid_privacy_breach.patch 2004-fix-privacy-breach-logo.patch +4000-use-after-free-hack.patch diff -Nru fontforge-20220308~dfsg/debian/rules fontforge-20220308~dfsg/debian/rules --- fontforge-20220308~dfsg/debian/rules 2021-01-15 07:35:01.000000000 +0000 +++ fontforge-20220308~dfsg/debian/rules 2022-06-21 12:15:06.000000000 +0000 @@ -57,6 +57,10 @@ override_dh_strip: dh_strip --dbgsym-migration='fontforge-dbg (<< 1:20170731~dfsg-2~)' +override_dh_auto_clean: + dh_auto_clean + rm -rf build + # track symbols using pkgkde-symbolshelper %: dh $@ --with pkgkde_symbolshelper