From 3ae4f002cb66b82a7437564528a5f239b3528d5d Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 15 Dec 2006 20:57:41 +0000 Subject: Fix a double-free while performing print operations which could trigger a segmentation fault if malloc debugging was enabled. Reported by: dougb --- www/firefox/Makefile | 2 +- .../files/patch-gfx_src_ps_nsFontMetricsPS.cpp | 26 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 www/firefox/files/patch-gfx_src_ps_nsFontMetricsPS.cpp (limited to 'www/firefox') diff --git a/www/firefox/Makefile b/www/firefox/Makefile index 2abeb1d7401d..86e94687293d 100644 --- a/www/firefox/Makefile +++ b/www/firefox/Makefile @@ -7,7 +7,7 @@ PORTNAME= firefox DISTVERSION= 2.0 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 1 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_MOZILLA_EXTENDED} diff --git a/www/firefox/files/patch-gfx_src_ps_nsFontMetricsPS.cpp b/www/firefox/files/patch-gfx_src_ps_nsFontMetricsPS.cpp new file mode 100644 index 000000000000..07014d87fa82 --- /dev/null +++ b/www/firefox/files/patch-gfx_src_ps_nsFontMetricsPS.cpp @@ -0,0 +1,26 @@ +--- gfx/src/ps/nsFontMetricsPS.cpp.orig Fri Dec 15 01:42:25 2006 ++++ gfx/src/ps/nsFontMetricsPS.cpp Fri Dec 15 01:41:20 2006 +@@ -1037,8 +1037,10 @@ nsFontPSXft::Init(nsXftEntry* aEntry, + + nsFontPSXft::~nsFontPSXft() + { +- if (mEntry->mFace) ++ if (mEntry->mFace) { + FT_Done_Face(mEntry->mFace); ++ mEntry->mFace = nsnull; ++ } + + if (FT_Done_FreeType(mFreeTypeLibrary)) + return; +@@ -2327,8 +2329,10 @@ nsXftType1Generator::Init(nsXftEntry* aE + + nsXftType1Generator::~nsXftType1Generator() + { +- if (mEntry->mFace) ++ if (mEntry->mFace) { + FT_Done_Face(mEntry->mFace); ++ mEntry->mFace = nsnull; ++ } + + if (FT_Done_FreeType(mFreeTypeLibrary)) + return; -- cgit