New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Tue Sep 13 07:54:47 UTC 2016


Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.

4 new defect(s) introduced to LibreOffice found with Coverity Scan.
14 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 4 of 4 defect(s)


** CID 1372879:  Insecure data handling  (INTEGER_OVERFLOW)
/lotuswordpro/source/filter/lwpgrfobj.cxx: 695 in LwpGraphicObject::XFConvertEquation(XFContentContainer *)()


________________________________________________________________________________________________________
*** CID 1372879:  Insecure data handling  (INTEGER_OVERFLOW)
/lotuswordpro/source/filter/lwpgrfobj.cxx: 695 in LwpGraphicObject::XFConvertEquation(XFContentContainer *)()
689                 nBegin++;
690                 nEnd--;
691             }
692     
693             if(nEnd >= nBegin)
694             {
>>>     CID 1372879:  Insecure data handling  (INTEGER_OVERFLOW)
>>>     Overflowed or truncated value (or a value computed from an overflowed or truncated value) "nEnd - nBegin + 1U" used as critical argument to function. [Note: The source code implementation of the function has been overridden by a builtin model.]
695                 sal_uInt8* pEquData = new sal_uInt8[nEnd - nBegin + 1];
696                 for(sal_uInt32 nIndex = 0; nIndex < nEnd - nBegin +1 ; nIndex++)
697                 {
698                     pEquData[nIndex] = pGrafData[nBegin + nIndex];
699                 }
700                 pXFNotePara->Add(OUString(reinterpret_cast<char*>(pEquData), (nEnd - nBegin + 1), osl_getThreadTextEncoding()));

** CID 1372878:  Integer handling issues  (DIVIDE_BY_ZERO)
/svtools/source/graphic/grfmgr2.cxx: 1678 in GraphicObject::ImplRenderTempTile(VirtualDevice &, int, int, const Size &, const GraphicAttr *, GraphicManagerDrawFlags)()


________________________________________________________________________________________________________
*** CID 1372878:  Integer handling issues  (DIVIDE_BY_ZERO)
/svtools/source/graphic/grfmgr2.cxx: 1678 in GraphicObject::ImplRenderTempTile(VirtualDevice &, int, int, const Size &, const GraphicAttr *, GraphicManagerDrawFlags)()
1672                nNumTilesY / nMSBFactor != 0 )
1673         {
1674             nMSBFactor *= nExponent;
1675         }
1676     
1677         // one less
>>>     CID 1372878:  Integer handling issues  (DIVIDE_BY_ZERO)
>>>     Assigning: "nMSBFactor" /= "2". The value of "nMSBFactor" is now 0.
1678         nMSBFactor /= nExponent;
1679     
1680         ImplTileInfo aTileInfo;
1681     
1682         // #105229# Switch off mapping (converting to logic and back to
1683         // pixel might cause roundoff errors)

** CID 1372877:  Possible Control flow issues  (DEADCODE)
/xmloff/source/core/xmlimp.cxx: 762 in SvXMLImport::startElement(const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList> &)()


________________________________________________________________________________________________________
*** CID 1372877:  Possible Control flow issues  (DEADCODE)
/xmloff/source/core/xmlimp.cxx: 762 in SvXMLImport::startElement(const rtl::OUString &, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList> &)()
756         SAL_WARN_IF( !xContext.is(), "xmloff.core", "SvXMLImport::startElement: missing context" );
757         if( !xContext.is() )
758             xContext.set(new SvXMLImportContext( *this, nPrefix, aLocalName ));
759     
760         // Remember old namespace map.
761         if( pRewindMap )
>>>     CID 1372877:  Possible Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "xContext->PutRewindMap(pRew...".
762             xContext->PutRewindMap( pRewindMap );
763     
764         // Call a startElement at the new context.
765         xContext->StartElement( xAttrList );
766     
767         // Push context on stack.

** CID 1372876:  Possible Control flow issues  (DEADCODE)
/xmloff/source/core/xmlimp.cxx: 880 in SvXMLImport::startFastElement(int, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> &)()


________________________________________________________________________________________________________
*** CID 1372876:  Possible Control flow issues  (DEADCODE)
/xmloff/source/core/xmlimp.cxx: 880 in SvXMLImport::startFastElement(int, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> &)()
874             rtl::Reference < comphelper::AttributeList > rAttrList = new comphelper::AttributeList;
875             maNamespaceHandler->addNSDeclAttributes( rAttrList );
876             SvXMLNamespaceMap *pRewindMap = nullptr;
877             processNSAttributes( rAttrList.get(), pRewindMap );
878             SvXMLImportContext *pContext = dynamic_cast<SvXMLImportContext*>( xContext.get() );
879             if( pContext && pRewindMap )
>>>     CID 1372876:  Possible Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "pContext->PutRewindMap(pRew...".
880                 pContext->PutRewindMap( pRewindMap );
881             maContexts.push_back( pContext );
882         }
883     
884         // Push context on stack.
885         maFastContexts.push_back( xContext );


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy2ptXl9f6yfUkC940Z6TqzA5I9GELRq8f655oJwjmcU7YF2dqsfSubPFHOUKnlNqxw-2FYkZMkRimI2Ip5S1u31M1NbppIYHAUJES-2FLq15FIcDJj07CgWB32Ms8z-2FIe9AaCpYvKUSq-2FX-2BuUra9r4cSjUJzHsRg66obI0v9r8r2dyKI-3D

To manage Coverity Scan email notifications for "libreoffice at lists.freedesktop.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4k1FZJSDV-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5N5X-2B1MAElavPQhH6nLwozJzqOkt2k8uOkYf2ZoppNa9QVe0T3fEZVQ7Kky1tOkLz_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy2ptXl9f6yfUkC940Z6TqzF1keNhg2LEwAzsEGQg0Jhq1JHEiAfLhBEbGumEjBI9LFOdgei1WTUoDdfpwiicRn7u7XHw7sfsaYBXafSjxcAkFjA7kScxfpdPlLqohOdgtOOedf7C3d79SqFf-2FQMGhfKSNctwei6xVWBuyqOVqDz8-3D



More information about the LibreOffice mailing list