Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index



Hi,

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

8 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 8 of 8 defect(s)


** CID 1358844:  Uninitialized members  (UNINIT_CTOR)
/opencl/inc/opencl_device_selection.h: 329 in <unnamed>::XmlWalker::XmlWalker()()


________________________________________________________________________________________________________
*** CID 1358844:  Uninitialized members  (UNINIT_CTOR)
/opencl/inc/opencl_device_selection.h: 329 in <unnamed>::XmlWalker::XmlWalker()()
323         xmlNodePtr mpCurrent;
324     
325         std::vector<xmlNodePtr> mpStack;
326     
327     public:
328         XmlWalker()
    CID 1358844:  Uninitialized members  (UNINIT_CTOR)
    Non-static class member "mpCurrent" is not initialized in this constructor nor in any 
functions that it calls.
329         {}
330     
331         ~XmlWalker()
332         {
333             xmlFreeDoc(mpDocPtr);
334         }

** CID 1358843:  Error handling issues  (NEGATIVE_RETURNS)
/opencl/source/opencl_device.cxx: 438 in 
opencl::<unnamed>::pickBestDevice(std::unique_ptr<ds_profile, std::default_delete<ds_profile>> &, 
int &)()


________________________________________________________________________________________________________
*** CID 1358843:  Error handling issues  (NEGATIVE_RETURNS)
/opencl/source/opencl_device.cxx: 438 in 
opencl::<unnamed>::pickBestDevice(std::unique_ptr<ds_profile, std::default_delete<ds_profile>> &, 
int &)()
432             if (fScore < bestScore)
433             {
434                 bestScore = fScore;
435                 rBestDeviceIndex = d;
436             }
437         }
    CID 1358843:  Error handling issues  (NEGATIVE_RETURNS)
    "rBestDeviceIndex" is passed to a parameter that cannot be negative. [Note: The source code 
implementation of the function has been overridden by a builtin model.]
438         if (profile->devices[rBestDeviceIndex].eType == DeviceType::OpenCLDevice)
439         {
440             SAL_INFO("opencl.device", "Selected Device[" << rBestDeviceIndex << "]: " << 
profile->devices[rBestDeviceIndex].sDeviceName << "(OpenCL).");
441         }
442         else
443         {

** CID 1358842:  Control flow issues  (MISSING_BREAK)
/sc/source/core/tool/interpr8.cxx: 1839 in ScInterpreter::ScTextJoin_MS()()


________________________________________________________________________________________________________
*** CID 1358842:  Control flow issues  (MISSING_BREAK)
/sc/source/core/tool/interpr8.cxx: 1839 in ScInterpreter::ScTextJoin_MS()()
1833                                         }
1834                                     }
1835                                 }
1836                             }
1837                         }
1838                     }
    CID 1358842:  Control flow issues  (MISSING_BREAK)
    The above case falls through to this one.
1839                     case svMissing :
1840                     {
1841                         if ( !bSkipEmpty )
1842                         {
1843                             if ( !bFirst )
1844                             {

** CID 1358840:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/misc-tests.cxx: 166 in SdMiscTest::testTdf99396()()


________________________________________________________________________________________________________
*** CID 1358840:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/misc-tests.cxx: 166 in SdMiscTest::testTdf99396()()
160         // Make sure that the undo stack is empty.
161         CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), 
xDocSh->GetDoc()->GetUndoManager()->GetUndoActionCount());
162     
163         // Set the vertical alignment of the cells to bottom.
164         sdr::table::SvxTableController* pTableController = 
dynamic_cast<sdr::table::SvxTableController*>(pView->getSelectionController().get());
165         SfxRequest aRequest(pViewShell->GetViewFrame(), SID_TABLE_VERT_BOTTOM);
    CID 1358840:  Null pointer dereferences  (FORWARD_NULL)
    Passing null pointer "pTableController" to "Execute", which dereferences it. (The 
dereference happens because this is a virtual function call.)
166         pTableController->Execute(aRequest);
167         // This was 0, it wasn't possible to undo a vertical alignment change.
168         CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), 
xDocSh->GetDoc()->GetUndoManager()->GetUndoActionCount());
169     
170         xDocSh->DoClose();
171     }

** CID 1358839:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/misc-tests.cxx: 203 in SdMiscTest::testTdf99396TextEdit()()


________________________________________________________________________________________________________
*** CID 1358839:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/misc-tests.cxx: 203 in SdMiscTest::testTdf99396TextEdit()()
197             const SfxItemSet* pArgs = aRequest.GetArgs();
198             pView->SetAttributes(*pArgs);
199         }
200         {
201             auto pTableController = 
dynamic_cast<sdr::table::SvxTableController*>(pView->getSelectionController().get());
202             SfxRequest aRequest(pViewShell->GetViewFrame(), SID_TABLE_VERT_BOTTOM);
    CID 1358839:  Null pointer dereferences  (FORWARD_NULL)
    Passing null pointer "pTableController" to "Execute", which dereferences it. (The 
dereference happens because this is a virtual function call.)
203             pTableController->Execute(aRequest);
204         }
205         pView->SdrEndTextEdit();
206     
207         // Check that the result is what we expect.
208         {

** CID 1358838:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/misc-tests.cxx: 180 in SdMiscTest::testTdf99396TextEdit()()


________________________________________________________________________________________________________
*** CID 1358838:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/misc-tests.cxx: 180 in SdMiscTest::testTdf99396TextEdit()()
174     {
175         // Load the document and select the table.
176         sd::DrawDocShellRef xDocSh = 
Load(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf99396.odp"), ODP);
177         sd::ViewShell* pViewShell = xDocSh->GetViewShell();
178         SdPage* pPage = pViewShell->GetActualPage();
179         SdrObject* pObject = pPage->GetObj(0);
    CID 1358838:  Null pointer dereferences  (FORWARD_NULL)
    Assigning: "pTableObject" = "dynamic_cast <sdr::table::SdrTableObj *>(pObject)".
180         auto pTableObject = dynamic_cast<sdr::table::SdrTableObj*>(pObject);
181         SdrView* pView = pViewShell->GetView();
182         pView->MarkObj(pObject, pView->GetSdrPageView());
183     
184         // Make sure that the undo stack is empty.
185         CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), 
xDocSh->GetDoc()->GetUndoManager()->GetUndoActionCount());

** CID 1358837:  Control flow issues  (DEADCODE)
/sd/source/ui/unoidl/unopage.cxx: 1481 in SdGenericDrawPage::CreateShape(SdrObject *) const()


________________________________________________________________________________________________________
*** CID 1358837:  Control flow issues  (DEADCODE)
/sd/source/ui/unoidl/unopage.cxx: 1481 in SdGenericDrawPage::CreateShape(SdrObject *) const()
1475                     aShapeType += "SlideNumberShape";
1476                     break;
1477                 case PRESOBJ_DATETIME:
1478                     aShapeType += "DateTimeShape";
1479                     break;
1480                 // coverity[dead_error_begin] - following conditions exist to avoid compiler 
warning
    CID 1358837:  Control flow issues  (DEADCODE)
    Execution cannot reach this statement: "case PRESOBJ_NONE:".
1481                 case PRESOBJ_NONE:
1482                 case PRESOBJ_IMAGE:
1483                 case PRESOBJ_MAX:
1484                     break;
1485                 }
1486     

** CID 1358836:  Resource leaks  (CTOR_DTOR_LEAK)
/vcl/opengl/PackedTextureAtlas.cxx: 117 in PackedTexture::PackedTexture(int, int)()


________________________________________________________________________________________________________
*** CID 1358836:  Resource leaks  (CTOR_DTOR_LEAK)
/vcl/opengl/PackedTextureAtlas.cxx: 117 in PackedTexture::PackedTexture(int, int)()
111     {
112         ImplOpenGLTexture* mpTexture;
113         std::unique_ptr<Node> mpRootNode;
114         int mnDeallocatedArea;
115     
116         PackedTexture(int nWidth, int nHeight)
    CID 1358836:  Resource leaks  (CTOR_DTOR_LEAK)
    The constructor allocates field "mpTexture" of "PackedTexture" but there is no destructor.
117             : mpTexture(new ImplOpenGLTexture(nWidth, nHeight, true))
118             , mpRootNode(new Node(nWidth, nHeight))
119             , mnDeallocatedArea(0)
120         {}
121     };
122     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://scan.coverity.com/projects/libreoffice?tab=overview

To manage Coverity Scan email notifications for "libreoffice@lists.freedesktop.org", click 
https://scan.coverity.com/subscriptions/edit?email=libreoffice%40lists.freedesktop.org&token=d6481d718a775246b2340f282ebe5939


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.