diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-13 20:54:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-13 20:59:22 +0100 |
commit | affd907cb4f19d006efc5cbde903970d7f97ef46 (patch) | |
tree | 8f660f1c2d6bc03e045344a480d0c38a76e50608 /vcl | |
parent | 3ded687bef4b72a9bb25ce8749c481809b9e04df (diff) |
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
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/impfont.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/source/gdi/impfont.cxx b/vcl/source/gdi/impfont.cxx index 223e9e1fd83b..7f80a3883af9 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; |