New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Sat Nov 12 02:38:59 UTC 2016


Hi,

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

12 new defect(s) introduced to LibreOffice found with Coverity Scan.
10 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 12 of 12 defect(s)


** CID 1394298:  Uninitialized members  (UNINIT_CTOR)
/xmlsecurity/inc/sigstruct.hxx: 112 in SignatureInformation::SignatureInformation(int)()


________________________________________________________________________________________________________
*** CID 1394298:  Uninitialized members  (UNINIT_CTOR)
/xmlsecurity/inc/sigstruct.hxx: 112 in SignatureInformation::SignatureInformation(int)()
106         css::uno::Sequence<sal_Int8> aSignatureBytes;
107     
108         SignatureInformation( sal_Int32 nId )
109         {
110             nSecurityId = nId;
111             nStatus = css::xml::crypto::SecurityOperationStatus_UNKNOWN;
>>>     CID 1394298:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "nDigestID" is not initialized in this constructor nor in any functions that it calls.
112         }
113     };
114     
115     typedef ::std::vector< SignatureInformation > SignatureInformations;
116     
117     #endif
118     

** CID 1394297:  Uninitialized variables  (UNINIT)
/xmlsecurity/source/helper/xsecctl.cxx: 901 in XSecController::getSignatureInformation(int) const()


________________________________________________________________________________________________________
*** CID 1394297:  Uninitialized variables  (UNINIT)
/xmlsecurity/source/helper/xsecctl.cxx: 901 in XSecController::getSignatureInformation(int) const()
895         OOXMLSecExporter aExporter(mxCtx, xRootStorage, xDocumentHandler, rInformation);
896         aExporter.writeSignature();
897     }
898     
899     SignatureInformation XSecController::getSignatureInformation( sal_Int32 nSecurityId ) const
900     {
>>>     CID 1394297:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "aInf".
901         SignatureInformation aInf( 0 );
902         int nIndex = findSignatureInfor(nSecurityId);
903         SAL_WARN_IF( nIndex == -1, "xmlsecurity.helper", "getSignatureInformation - SecurityId is invalid!" );
904         if ( nIndex != -1)
905         {
906             aInf = m_vInternalSignatureInformations[nIndex].signatureInfor;

** CID 1394296:  Null pointer dereferences  (REVERSE_INULL)
/dbaccess/source/core/dataaccess/ModelImpl.cxx: 988 in dbaccess::ODatabaseModelImpl::release()()


________________________________________________________________________________________________________
*** CID 1394296:  Null pointer dereferences  (REVERSE_INULL)
/dbaccess/source/core/dataaccess/ModelImpl.cxx: 988 in dbaccess::ODatabaseModelImpl::release()()
982         if ( osl_atomic_decrement(&m_refCount) == 0 )
983         {
984             acquire();  // prevent multiple releases
985             m_pDBContext->removeFromTerminateListener(*this);
986             dispose();
987             m_pDBContext->storeTransientProperties(*this);
>>>     CID 1394296:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "this->m_pDBContext" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
988             if ( m_pDBContext && !m_sDocumentURL.isEmpty() )
989                 m_pDBContext->revokeDatabaseDocument( *this );
990             delete this;
991         }
992     }
993     

** CID 1394295:  Error handling issues  (CHECKED_RETURN)
/connectivity/source/drivers/firebird/PreparedStatement.cxx: 333 in <unnamed>::toNumericWithoutDecimalPlace(const rtl::OUString &)()


________________________________________________________________________________________________________
*** CID 1394295:  Error handling issues  (CHECKED_RETURN)
/connectivity/source/drivers/firebird/PreparedStatement.cxx: 333 in <unnamed>::toNumericWithoutDecimalPlace(const rtl::OUString &)()
327      */
328     sal_Int64 toNumericWithoutDecimalPlace(const OUString& sSource)
329     {
330         OUString sNumber(sSource);
331     
332         // cut off leading 0 eventually ( eg. 0.567 -> .567)
>>>     CID 1394295:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "startsWith" without checking return value (as is done elsewhere 119 out of 122 times).
333         sSource.startsWith("0", &sNumber);
334     
335         sal_Int32 nDotIndex = sNumber.indexOf((sal_Unicode)'.');
336     
337         if( nDotIndex < 0)
338         {

** CID 1394294:    (CHECKED_RETURN)
/sd/source/ui/view/sdview3.cxx: 289 in sd::View::InsertData(const TransferableDataHelper &, const Point &, signed char &, bool, SotClipboardFormatId, unsigned short, unsigned short)()
/sd/source/ui/view/sdview3.cxx: 711 in sd::View::InsertData(const TransferableDataHelper &, const Point &, signed char &, bool, SotClipboardFormatId, unsigned short, unsigned short)()


________________________________________________________________________________________________________
*** CID 1394294:    (CHECKED_RETURN)
/sd/source/ui/view/sdview3.cxx: 289 in sd::View::InsertData(const TransferableDataHelper &, const Point &, signed char &, bool, SotClipboardFormatId, unsigned short, unsigned short)()
283             nPasteOptions |= SdrInsertFlags::DONTMARK;
284         }
285     
286         if( bDrag )
287         {
288             SdrPageView* pPV = nullptr;
>>>     CID 1394294:    (CHECKED_RETURN)
>>>     Calling "PickObj" without checking return value (as is done elsewhere 40 out of 50 times).
289             PickObj( rPos, getHitTolLog(), pPickObj, pPV );
290         }
291     
292         if( nPage != SDRPAGE_NOTFOUND )
293             pPage = static_cast<SdPage*>( mrDoc.GetPage( nPage ) );
294     
/sd/source/ui/view/sdview3.cxx: 711 in sd::View::InsertData(const TransferableDataHelper &, const Point &, signed char &, bool, SotClipboardFormatId, unsigned short, unsigned short)()
705                         if( pModel->GetSdPage( 0, PageKind::Standard )->GetObjCount() == 1 )
706                         {
707                             // only one object
708                             SdrObject*      pObj = pModel->GetSdPage( 0, PageKind::Standard )->GetObj( 0 );
709                             SdrObject*      pPickObj2 = nullptr;
710                             SdrPageView*    pPV = nullptr;
>>>     CID 1394294:    (CHECKED_RETURN)
>>>     Calling "PickObj" without checking return value (as is done elsewhere 40 out of 50 times).
711                             PickObj( rPos, getHitTolLog(), pPickObj2, pPV );
712     
713                             if( ( mnAction & DND_ACTION_MOVE ) && pPickObj2 && pObj )
714                             {
715                                 // replace object
716                                 SdrObject*  pNewObj = pObj->Clone();

** CID 1394293:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/frmedt/feshview.cxx: 2790 in SwFEShell::Chain(SwFrameFormat &, const Point &)()


________________________________________________________________________________________________________
*** CID 1394293:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/frmedt/feshview.cxx: 2790 in SwFEShell::Chain(SwFrameFormat &, const Point &)()
2784             StartAllAction();
2785             SdrObject* pObj;
2786             SdrPageView* pPView;
2787             SwDrawView *pDView = Imp()->GetDrawView();
2788             const auto nOld = pDView->GetHitTolerancePixel();
2789             pDView->SetHitTolerancePixel( 0 );
>>>     CID 1394293:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "PickObj" without checking return value (as is done elsewhere 40 out of 50 times).
2790             pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SdrSearchOptions::PICKMARKABLE );
2791             pDView->SetHitTolerancePixel( nOld );
2792             SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame();
2793     
2794             SwFlyFrameFormat *pFormat = pFly->GetFormat();
2795             GetDoc()->Chain(rSource, *pFormat);

** CID 1394292:  Error handling issues  (CHECKED_RETURN)
/xmlsecurity/source/helper/documentsignaturemanager.cxx: 67 in DocumentSignatureManager::getPDFSignatureHelper()()


________________________________________________________________________________________________________
*** CID 1394292:  Error handling issues  (CHECKED_RETURN)
/xmlsecurity/source/helper/documentsignaturemanager.cxx: 67 in DocumentSignatureManager::getPDFSignatureHelper()()
61         return mxSecurityContext.is();
62     }
63     
64     PDFSignatureHelper& DocumentSignatureManager::getPDFSignatureHelper()
65     {
66         if (!mxSecurityContext.is())
>>>     CID 1394292:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "init" without checking return value (as is done elsewhere 10 out of 11 times).
67             init();
68     
69         if (!mpPDFSignatureHelper)
70             mpPDFSignatureHelper.reset(new PDFSignatureHelper(mxContext));
71     
72         return *mpPDFSignatureHelper;

** CID 982192:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/frmedt/feshview.cxx: 1282 in SwFEShell::GetObjAt(const Point &)()


________________________________________________________________________________________________________
*** CID 982192:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/frmedt/feshview.cxx: 1282 in SwFEShell::GetObjAt(const Point &)()
1276         if( pDView )
1277         {
1278             SdrPageView* pPV;
1279             const auto nOld = pDView->GetHitTolerancePixel();
1280             pDView->SetHitTolerancePixel( pDView->GetMarkHdlSizePixel()/2 );
1281     
>>>     CID 982192:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "PickObj" without checking return value (as is done elsewhere 40 out of 50 times).
1282             pDView->PickObj( rPt, pDView->getHitTolLog(), pRet, pPV, SdrSearchOptions::PICKMARKABLE );
1283             pDView->SetHitTolerancePixel( nOld );
1284         }
1285         return pRet;
1286     }
1287     

** CID 704016:  Error handling issues  (CHECKED_RETURN)
/sd/source/ui/view/sdview4.cxx: 98 in sd::View::InsertGraphic(const Graphic &, signed char &, const Point &, SdrObject *, ImageMap *)()


________________________________________________________________________________________________________
*** CID 704016:  Error handling issues  (CHECKED_RETURN)
/sd/source/ui/view/sdview4.cxx: 98 in sd::View::InsertGraphic(const Graphic &, signed char &, const Point &, SdrObject *, ImageMap *)()
92                 pPV = nullptr;
93         }
94     
95         if( !pPickObj && pPV )
96         {
97             SdrPageView* pPageView = pPV;
>>>     CID 704016:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "PickObj" without checking return value (as is done elsewhere 40 out of 50 times).
98             PickObj(rPos, getHitTolLog(), pPickObj, pPageView);
99         }
100     
101         const bool bIsGraphic(dynamic_cast< const SdrGrafObj* >(pPickObj) !=  nullptr);
102     
103         if (DND_ACTION_LINK == mnAction

** CID 704013:  Error handling issues  (CHECKED_RETURN)
/sd/source/ui/func/fusel.cxx: 1489 in sd::FuSelection::pickObject(const Point &)()


________________________________________________________________________________________________________
*** CID 704013:  Error handling issues  (CHECKED_RETURN)
/sd/source/ui/func/fusel.cxx: 1489 in sd::FuSelection::pickObject(const Point &)()
1483     
1484     SdrObject* FuSelection::pickObject (const Point& rTestPoint)
1485     {
1486         SdrObject* pObject = nullptr;
1487         SdrPageView* pPageView;
1488         sal_uInt16 nHitLog = sal_uInt16 (mpWindow->PixelToLogic(Size(HITPIX,0)).Width());
>>>     CID 704013:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "PickObj" without checking return value (as is done elsewhere 40 out of 50 times).
1489         mpView->PickObj (rTestPoint, nHitLog, pObject, pPageView, SdrSearchOptions::PICKMARKABLE);
1490         return pObject;
1491     }
1492     
1493     void FuSelection::ForcePointer(const MouseEvent* pMEvt)
1494     {

** CID 704011:  Error handling issues  (CHECKED_RETURN)
/sd/source/ui/func/fudraw.cxx: 545 in sd::FuDraw::ForcePointer(const MouseEvent *)()


________________________________________________________________________________________________________
*** CID 704011:  Error handling issues  (CHECKED_RETURN)
/sd/source/ui/func/fudraw.cxx: 545 in sd::FuDraw::ForcePointer(const MouseEvent *)()
539                     }
540                 }
541     
542                 if (eHit == SdrHitKind::NONE)
543                 {
544                     // found nothing -> look after at the masterpage
>>>     CID 704011:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "PickObj" without checking return value (as is done elsewhere 40 out of 50 times).
545                     mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER);
546                 }
547                 else if (eHit == SdrHitKind::UnmarkedObject)
548                 {
549                     pObj = aVEvt.pObj;
550                 }

** CID 703927:  Error handling issues  (CHECKED_RETURN)
/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx: 181 in chart::DrawViewWrapper::getHitObject(const Point &) const()


________________________________________________________________________________________________________
*** CID 703927:  Error handling issues  (CHECKED_RETURN)
/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx: 181 in chart::DrawViewWrapper::getHitObject(const Point &) const()
175     SdrObject* DrawViewWrapper::getHitObject( const Point& rPnt ) const
176     {
177         SdrObject* pRet = nullptr;
178         SdrSearchOptions nOptions = SdrSearchOptions::DEEP | SdrSearchOptions::TESTMARKABLE;
179     
180         SdrPageView* pSdrPageView = this->GetPageView();
>>>     CID 703927:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "PickObj" without checking return value (as is done elsewhere 40 out of 50 times).
181         this->SdrView::PickObj(rPnt, lcl_getHitTolerance( this->GetFirstOutputDevice() ), pRet, pSdrPageView, nOptions);
182     
183         if( pRet )
184         {
185             //ignore some special shapes
186             OUString aShapeName = pRet->GetName();


________________________________________________________________________________________________________
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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyrZvVhUxJE8GCefpuOdjc5Ywmt4AABJsmqw18JBMlU8ayf5tl3JcIDBwx9hlaHjEwn7f4-2F80kg4edAVjv0Ima3ZA7dz4U-2BLUuIHfVQzdaDiC4gl-2FFkgGdStn2GTscprf-2FJokm-2BXtMcKlIXiTZABJ6eTU7Z9WCgBi1HEinShmPSsw-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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyrZvVhUxJE8GCefpuOdjc5XFgkMceeJ6dcHZkXKv3vBxmrFf-2BFs-2FidkEKeA8z1lFwnDYfTNPV4uI-2FENWdxacAaHX4GJ4JTbUqucuKacZt6wKrPaxOaf19moDfmBO-2FSsv31WnaBLfjg9Shg4dSGcpCswJDNjpK34UHGlmlcKkBIfU-3D



More information about the LibreOffice mailing list