aboutsummaryrefslogtreecommitdiffstats
path: root/x11-fonts
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2003-04-19 00:59:36 +0800
committermarcus <marcus@FreeBSD.org>2003-04-19 00:59:36 +0800
commit657f368c8bcf9340da7e56a2ecc12aa3d2f52955 (patch)
tree73bb105b8466bf17497569d103d9ce7b020553ed /x11-fonts
parent0fa476dfcb484ff05c42c7e1e508ab800fd88aa1 (diff)
downloadfreebsd-ports-gnome-657f368c8bcf9340da7e56a2ecc12aa3d2f52955.tar.gz
freebsd-ports-gnome-657f368c8bcf9340da7e56a2ecc12aa3d2f52955.tar.zst
freebsd-ports-gnome-657f368c8bcf9340da7e56a2ecc12aa3d2f52955.zip
Add patch to avoid dereferencing a NULL pointer in freetype2. This fixes
a crash with certain monotype fonts such as the Windows FixedSys fonts. Note, the real fix should go into freetype2, but I'm still waiting for feedback from them. Obtained from: Fontconfig CVS
Diffstat (limited to 'x11-fonts')
-rw-r--r--x11-fonts/fontconfig/Makefile1
-rw-r--r--x11-fonts/fontconfig/files/patch-src_fcfreetype.c46
2 files changed, 47 insertions, 0 deletions
diff --git a/x11-fonts/fontconfig/Makefile b/x11-fonts/fontconfig/Makefile
index 295c1bd9fa1e..b717bf2445b4 100644
--- a/x11-fonts/fontconfig/Makefile
+++ b/x11-fonts/fontconfig/Makefile
@@ -7,6 +7,7 @@
PORTNAME= fontconfig
PORTVERSION= 2.1.94
+PORTREVISION= 1
CATEGORIES= x11-fonts
MASTER_SITES= http://www.fontconfig.org/release/ \
http://nexp.cs.pdx.edu/fontconfig/release/
diff --git a/x11-fonts/fontconfig/files/patch-src_fcfreetype.c b/x11-fonts/fontconfig/files/patch-src_fcfreetype.c
new file mode 100644
index 000000000000..e28b4f4dc0fc
--- /dev/null
+++ b/x11-fonts/fontconfig/files/patch-src_fcfreetype.c
@@ -0,0 +1,46 @@
+--- src/fcfreetype.c 2003/04/16 18:08:47 1.23
++++ src/fcfreetype.c 2003/04/18 15:56:05 1.25
+@@ -55,9 +55,15 @@
+ #include <freetype/ttnameid.h>
+ #include <freetype/t1tables.h>
+
+-#if (FREETYPE_MINOR > 1 || (FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 3))
++#if (FREETYPE_MINOR > 1 || (FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 4))
+ #include <freetype/ftbdf.h>
++#include <freetype/ftmodule.h>
+ #define USE_FTBDF
++#define HAS_BDF_PROPERTY(f) ((f) && (f)->driver && \
++ (f)->driver->root.clazz->get_interface)
++#define MY_Get_BDF_Property(f,n,p) (HAS_BDF_PROPERTY(f) ? \
++ FT_Get_BDF_Property(f,n,p) : \
++ FT_Err_Invalid_Argument)
+ #endif
+
+
+@@ -781,7 +787,7 @@
+ {
+ int rc;
+ BDF_PropertyRec prop;
+- rc = FT_Get_BDF_Property(face, "FOUNDRY", &prop);
++ rc = MY_Get_BDF_Property(face, "FOUNDRY", &prop);
+ if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_ATOM)
+ foundry = prop.u.atom;
+ }
+@@ -789,7 +795,7 @@
+ if (width == -1)
+ {
+ BDF_PropertyRec prop;
+- if (FT_Get_BDF_Property(face, "RELATIVE_SETWIDTH", &prop) == 0 &&
++ if (MY_Get_BDF_Property(face, "RELATIVE_SETWIDTH", &prop) == 0 &&
+ (prop.type == BDF_PROPERTY_TYPE_INTEGER ||
+ prop.type == BDF_PROPERTY_TYPE_CARDINAL))
+ {
+@@ -811,7 +817,7 @@
+ case 9: width = FC_WIDTH_ULTRAEXPANDED; break;
+ }
+ }
+- else if (FT_Get_BDF_Property (face, "SETWIDTH_NAME", &prop) == 0 &&
++ else if (MY_Get_BDF_Property (face, "SETWIDTH_NAME", &prop) == 0 &&
+ prop.type == BDF_PROPERTY_TYPE_ATOM)
+ {
+ static struct {