[Libreoffice-commits] core.git: vcl/source
Caolán McNamara
caolanm at redhat.com
Mon Oct 13 12:59:53 PDT 2014
vcl/source/gdi/impfont.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit affd907cb4f19d006efc5cbde903970d7f97ef46
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 13 20:54:35 2014 +0100
valgrind + bff, multiple failures, initialize ref counts to 0...
for boost::intrusive_ptr
==6595== Conditional jump or move depends on uninitialised value(s)
==6595== at 0xB21664D: intrusive_ptr_release(FontCharMap*) (metric.hxx:226)
==6595== by 0xB2172F6: boost::intrusive_ptr<FontCharMap>::~intrusive_ptr() (intrusive_ptr.hpp:97)
==6595== by 0xB5AE196: FtFontInfo::GetFontCharMap() (gcach_ftyp.cxx:1287)
Change-Id: Iea5ab13b093945c840481f29bc626a16dcbc234b
diff --git a/vcl/source/gdi/impfont.cxx b/vcl/source/gdi/impfont.cxx
index 223e9e1..7f80a38 100644
--- a/vcl/source/gdi/impfont.cxx
+++ b/vcl/source/gdi/impfont.cxx
@@ -52,7 +52,7 @@ ImplFontCharMap::ImplFontCharMap( const CmapResult& rCR )
, mpGlyphIds( rCR.mpGlyphIds )
, mnRangeCount( rCR.mnRangeCount )
, mnCharCount( 0 )
-, mnRefCount( 1 )
+, mnRefCount( 0 )
{
const sal_UCS4* pRangePtr = mpRangeCodes;
for( int i = mnRangeCount; --i >= 0; pRangePtr += 2 )
@@ -374,14 +374,17 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
}
FontCharMap::FontCharMap()
-: mpImplFontCharMap( ImplFontCharMap::getDefaultMap() )
+ : mpImplFontCharMap( ImplFontCharMap::getDefaultMap() )
+ , mnRefCount(0)
{}
FontCharMap::FontCharMap( ImplFontCharMapPtr pIFCMap )
-: mpImplFontCharMap( pIFCMap )
+ : mpImplFontCharMap( pIFCMap )
+ , mnRefCount(0)
{}
FontCharMap::FontCharMap( const CmapResult& rCR )
+ : mnRefCount(0)
{
ImplFontCharMapPtr pImplFontCharMap( new ImplFontCharMap(rCR) );
mpImplFontCharMap = pImplFontCharMap;
More information about the Libreoffice-commits
mailing list