From cdfa7d1d6354aa6f705fc23a97f2522d64c51099 Mon Sep 17 00:00:00 2001 From: "chanial%noos.fr" Date: Sun, 29 Feb 2004 23:04:37 +0000 Subject: [PATCH] Bug 235913: Random crashes while printing on Solaris, patch by Roland Mainz, r=biesi, sr=bz --- gfx/src/xlib/nsFontMetricsXlib.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/src/xlib/nsFontMetricsXlib.cpp b/gfx/src/xlib/nsFontMetricsXlib.cpp index 63838122f27b..a1f53f123f20 100644 --- a/gfx/src/xlib/nsFontMetricsXlib.cpp +++ b/gfx/src/xlib/nsFontMetricsXlib.cpp @@ -1248,7 +1248,8 @@ nsFontMetricsXlibContext::Init(nsIDeviceContext *aDevice, PRBool aPrintermode) if (NS_SUCCEEDED(rv)) mAllowDoubleByteSpecialChars = val; - PRUint32 dbmapSize = sizeof(gDoubleByteSpecialCharsCCMap); + /* Make sure we allocate/copy enougth (see http://bugzilla.mozilla.org/show_bug.cgi?id=235913#c12)*/ + PRUint32 dbmapSize = sizeof(gDoubleByteSpecialCharsCCMapUnion); mDoubleByteSpecialCharsCCMap = (PRUint16*)PR_Malloc(dbmapSize); if (!mDoubleByteSpecialCharsCCMap) return NS_ERROR_OUT_OF_MEMORY;