MFH: r534715

x11-fonts/fontconfig: webfonts on many sites crash www/firefox

A "bad" commit [1] included in the recent fontconfig upgrade to 2.13.92, lead to many
crashed tabs inside firefox. A fix has been provided upstream in [2], and fixed in fix [3].

Related Mozilla bugreport [4].

[1] https://cgit.freedesktop.org/fontconfig/commit/?id=61573ad5f7c4dd0860d613d99d0086433240eb75
[2] https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/237
[3] 6edaaa4d18
[4] https://bugzilla.mozilla.org/show_bug.cgi?id=1629231

PR:		245915
Submitted by:	jbeich
Reported by:	Graham Perrin, jbeich, ehaupt, tcberner

Approved by:	ports-secteam (implicit)
This commit is contained in:
Tobias C. Berner 2020-05-09 07:04:53 +00:00
parent 952004cb9b
commit b28094503f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q2/; revision=534716
2 changed files with 14 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= fontconfig
PORTVERSION= 2.13.92
PORTREVISION?= 1
PORTREVISION?= 2
PORTEPOCH?= 1
CATEGORIES= x11-fonts
MASTER_SITES= https://www.freedesktop.org/software/fontconfig/release/

View File

@ -28,6 +28,8 @@
# https://cgit.freedesktop.org/fontconfig/commit/?id=71d6866d381a0ab3585eb9ee760aeec98e722359
# Fix memory leaks
# https://cgit.freedesktop.org/fontconfig/commit/?id=61573ad5f7c4dd0860d613d99d0086433240eb75
# Set name_mapping to NULL after freeing to avoid risk of double-free.
# https://cgit.freedesktop.org/fontconfig/commit/?id=6edaaa4d1823518a97fb4cc3004d110b1046f742
# Fix assertion in FcFini()
# https://cgit.freedesktop.org/fontconfig/commit/?id=fbc05949ef52c8a8d69233eed77f6636dffec280
# Set exact boolean value to color property
@ -1338,6 +1340,17 @@ test/test-bz1744377.c, test/test-crbug1004254.c, test/test-issue180.c.
if (FcDebug () & FC_DBG_SCANV)
printf ("found full (n %2d p %d e %d l 0x%04x)",
sname.name_id, sname.platform_id,
@@ -1624,7 +1627,10 @@ FcFreeTypeQueryFaceInternal (const FT_Fa
}
}
if (!nm_share)
+ {
free (name_mapping);
+ name_mapping = NULL;
+ }
if (!nfamily && face->family_name &&
FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->family_name, (FcChar8 *) "") != 0)
@@ -1679,6 +1682,61 @@ FcFreeTypeQueryFaceInternal (const FT_Fa
++nfamily;
}