New Defects reported by Coverity Scan for LibreOffice

Khaled Hosny khaledhosny at eglug.org
Fri May 11 19:33:54 UTC 2018


On Fri, May 11, 2018 at 01:52:50PM +0000, scan-admin at coverity.com wrote:
> ** CID 1435548:  Null pointer dereferences  (FORWARD_NULL)
> 
> 
> ________________________________________________________________________________________________________
> *** CID 1435548:  Null pointer dereferences  (FORWARD_NULL)
> /vcl/unx/generic/glyphs/freetype_glyphcache.cxx: 350 in FreetypeManager::CreateFont(const FontSelectPattern &)()
> 344         if( it != maFontList.end() )
> 345             pFontInfo = it->second;
> 346     
> 347         if( !pFontInfo )
> 348             return nullptr;
> 349     
> >>>     CID 1435548:  Null pointer dereferences  (FORWARD_NULL)
> >>>     Passing "rFSD" to "FreetypeFont", which dereferences null "rFSD.mpFontInstance".
> 350         FreetypeFont* pNew = new FreetypeFont( rFSD, pFontInfo );
> 351     
> 352         return pNew;
> 353     }
> 354     
> 355     FreetypeFontFace::FreetypeFontFace( FreetypeFontInfo* pFI, const FontAttributes& rDFA )

No idea why this is now triggering an issue, but FreetypeFont
constructor have been unconditionally accessing rFSD.mpFontInstance
since forever.

Regards,
Khaled


More information about the LibreOffice mailing list