New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Sun May 15 07:14:25 UTC 2016


Hi,

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

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


** CID 1361592:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/window/window.cxx: 756 in ImplWinData::ImplWinData()()


________________________________________________________________________________________________________
*** CID 1361592:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/window/window.cxx: 756 in ImplWinData::ImplWinData()()
750         mpFocusRect(nullptr),
751         mpTrackRect(nullptr),
752         mnTrackFlags(ShowTrackFlags::NONE),
753         mnIsTopWindow((sal_uInt16) ~0), // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow())
754         mbMouseOver(false)
755     {
>>>     CID 1361592:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "mbEnableNativeWidget" is not initialized in this constructor nor in any functions that it calls.
756     }
757     
758     ImplWinData::~ImplWinData()
759     {
760         delete mpExtOldText;
761         delete mpExtOldAttrAry;

** CID 1361591:  Uninitialized members  (UNINIT_CTOR)
/filter/source/msfilter/svdfppt.cxx: 4364 in PPTStyleSheet::PPTStyleSheet(const DffRecordHeader &, SvStream &, SdrPowerPointImport &, const PPTTextCharacterStyleAtomInterpreter &, const PPTTextParagraphStyleAtomInterpreter &, const PPTTextSpecInfo &)()


________________________________________________________________________________________________________
*** CID 1361591:  Uninitialized members  (UNINIT_CTOR)
/filter/source/msfilter/svdfppt.cxx: 4364 in PPTStyleSheet::PPTStyleSheet(const DffRecordHeader &, SvStream &, SdrPowerPointImport &, const PPTTextCharacterStyleAtomInterpreter &, const PPTTextParagraphStyleAtomInterpreter &, const PPTTextSpecInfo &)()
4358                     if ( eNumRuleType == SvxNumRuleType::PRESENTATION_NUMBERING )
4359                         aRule.SetLevel( 0, aNumberFormat );
4360                 }
4361             }
4362             mpNumBulletItem[ i ] = new SvxNumBulletItem( aRule, EE_PARA_NUMBULLET );
4363         }
>>>     CID 1361591:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member field "mpNumBulletItem.detail_values" is not initialized in this constructor nor in any functions that it calls.
4364     }
4365     
4366     PPTStyleSheet::~PPTStyleSheet()
4367     {
4368         for ( auto i : o3tl::enumrange<TSS_Type>() )
4369         {

** CID 1361590:  Uninitialized members  (UNINIT_CTOR)
/sd/source/ui/view/outlview.cxx: 155 in sd::OutlineView::OutlineView(sd::DrawDocShell &, vcl::Window *, sd::OutlineViewShell &)()


________________________________________________________________________________________________________
*** CID 1361590:  Uninitialized members  (UNINIT_CTOR)
/sd/source/ui/view/outlview.cxx: 155 in sd::OutlineView::OutlineView(sd::DrawDocShell &, vcl::Window *, sd::OutlineViewShell &)()
149     
150         // Tell undo manager of the document about the undo manager of the
151         // outliner, so that the former can synchronize with the later.
152         sd::UndoManager* pDocUndoMgr = dynamic_cast<sd::UndoManager*>(mpDocSh->GetUndoManager());
153         if (pDocUndoMgr != nullptr)
154             pDocUndoMgr->SetLinkedUndoManager(&mrOutliner.GetUndoManager());
>>>     CID 1361590:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "mnPaperWidth" is not initialized in this constructor nor in any functions that it calls.
155     }
156     
157     /**
158      * Destructor, restore Links, clear Outliner
159      */
160     OutlineView::~OutlineView()

** CID 1361589:  Resource leaks  (RESOURCE_LEAK)
/desktop/source/lib/init.cxx: 1191 in DispatchResultListener::dispatchFinished(const com::sun::star::frame::DispatchResultEvent &)()


________________________________________________________________________________________________________
*** CID 1361589:  Resource leaks  (RESOURCE_LEAK)
/desktop/source/lib/init.cxx: 1191 in DispatchResultListener::dispatchFinished(const com::sun::star::frame::DispatchResultEvent &)()
1185     
1186             // TODO UNO Any rEvent.Result -> JSON
1187             // aTree.put("result": "...");
1188     
1189             std::stringstream aStream;
1190             boost::property_tree::write_json(aStream, aTree);
>>>     CID 1361589:  Resource leaks  (RESOURCE_LEAK)
>>>     Failing to save or free storage allocated by "strdup(std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::__string_type(aStream.str()).c_str())" leaks it.
1191             mpCallback->queue(LOK_CALLBACK_UNO_COMMAND_RESULT, strdup(aStream.str().c_str()));
1192         }
1193     
1194         virtual void SAL_CALL disposing(const css::lang::EventObject&) throw (css::uno::RuntimeException, std::exception) override {}
1195     };
1196     

** CID 1361588:  Null pointer dereferences  (NULL_RETURNS)
/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java: 60 in com.sun.star.script.framework.provider.javascript.ScriptEditorForJavaScript.<clinit>()()


________________________________________________________________________________________________________
*** CID 1361588:  Null pointer dereferences  (NULL_RETURNS)
/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java: 60 in com.sun.star.script.framework.provider.javascript.ScriptEditorForJavaScript.<clinit>()()
54         private static Map<String, ScriptEditorForJavaScript> BEING_EDITED = new
55         HashMap<String, ScriptEditorForJavaScript>();
56     
57         static {
58             try {
59                 URL url = ScriptEditorForJavaScript.class.getResource("template.js");
>>>     CID 1361588:  Null pointer dereferences  (NULL_RETURNS)
>>>     Calling a method on null object "url".
60                 InputStream in = url.openStream();
61                 StringBuilder buf = new StringBuilder();
62                 byte[] b = new byte[1024];
63                 int len;
64     
65                 while ((len = in.read(b)) != -1) {

** CID 1361587:  Null pointer dereferences  (NULL_RETURNS)
/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java: 74 in com.sun.star.script.framework.provider.beanshell.ScriptEditorForBeanShell.<clinit>()()


________________________________________________________________________________________________________
*** CID 1361587:  Null pointer dereferences  (NULL_RETURNS)
/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java: 74 in com.sun.star.script.framework.provider.beanshell.ScriptEditorForBeanShell.<clinit>()()
68         private static String BSHTEMPLATE;
69     
70         // try to load the template for BeanShell scripts
71         static {
72             try {
73                 URL url = ScriptEditorForBeanShell.class.getResource("template.bsh");
>>>     CID 1361587:  Null pointer dereferences  (NULL_RETURNS)
>>>     Calling a method on null object "url".
74                 InputStream in = url.openStream();
75                 StringBuilder buf = new StringBuilder();
76                 byte[] b = new byte[1024];
77                 int len;
78     
79                 while ((len = in.read(b)) != -1) {

** CID 1361586:  Null pointer dereferences  (FORWARD_NULL)
/sc/qa/unit/tiledrendering/tiledrendering.cxx: 112 in ScTiledRenderingTest::createDoc(const char *)()


________________________________________________________________________________________________________
*** CID 1361586:  Null pointer dereferences  (FORWARD_NULL)
/sc/qa/unit/tiledrendering/tiledrendering.cxx: 112 in ScTiledRenderingTest::createDoc(const char *)()
106     {
107         if (mxComponent.is())
108             mxComponent->dispose();
109         mxComponent = loadFromDesktop(m_directories.getURLFromSrc(DATA_DIRECTORY) + OUString::createFromAscii(pName), "com.sun.star.sheet.SpreadsheetDocument");
110         ScModelObj* pModelObj = dynamic_cast<ScModelObj*>(mxComponent.get());
111         CPPUNIT_ASSERT(pModelObj);
>>>     CID 1361586:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pModelObj" to "initializeForTiledRendering", which dereferences it. (The dereference happens because this is a virtual function call.)
112         pModelObj->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
113         return pModelObj;
114     }
115     
116     void ScTiledRenderingTest::callback(int nType, const char* pPayload, void* pData)
117     {

** CID 1361585:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/uiwriter/uiwriter.cxx: 3700 in SwUiWriterTest::testTdf84695NormalChar()()


________________________________________________________________________________________________________
*** CID 1361585:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/uiwriter/uiwriter.cxx: 3700 in SwUiWriterTest::testTdf84695NormalChar()()
3694     
3695         // Then select it.
3696         pWrtShell->SelectObj(Point(), 0, pObject);
3697     
3698         // Now pressing 'a' should add a character.
3699         SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument *>(mxComponent.get());
>>>     CID 1361585:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pXTextDocument" to "postKeyEvent", which dereferences it. (The dereference happens because this is a virtual function call.)
3700         pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'a', 0);
3701     
3702         uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
3703         // This was empty, pressing a normal character did not start the fly frame edit mode.
3704         CPPUNIT_ASSERT_EQUAL(OUString("a"), xShape->getString());
3705     }

** CID 1361584:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/ww8export/ww8export.cxx: 574 in testRES_MIRROR_GRAPH_BOTH::verify()()


________________________________________________________________________________________________________
*** CID 1361584:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/ww8export/ww8export.cxx: 574 in testRES_MIRROR_GRAPH_BOTH::verify()()
568         nVA = Desc.GetVerticalAdjustment();
569         CPPUNIT_ASSERT_EQUAL( drawing::TextVerticalAdjust_BLOCK, nVA );
570     }
571     
572     DECLARE_WW8EXPORT_TEST(testRES_MIRROR_GRAPH_BOTH, "tdf56321_flipImage_both.doc")
573     {
>>>     CID 1361584:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "pTextDoc" = "dynamic_cast <SwXTextDocument *>(this->mxComponent.get())".
574         SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
575         CPPUNIT_ASSERT(pTextDoc);
576         SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
577         CPPUNIT_ASSERT(pDoc);
578     
579         for (int n = 0; ; n++)

** CID 1361583:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/import-tests.cxx: 1248 in SdImportTest::testTdf62255()()


________________________________________________________________________________________________________
*** CID 1361583:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/import-tests.cxx: 1248 in SdImportTest::testTdf62255()()
1242     void SdImportTest::testTdf62255()
1243     {
1244         sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf62255.pptx"), PPTX);
1245         const SdrPage *pPage = GetPage( 1, xDocShRef );
1246     
1247         sdr::table::SdrTableObj *pTableObj;
>>>     CID 1361583:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "pTableObj" = "dynamic_cast <sdr::table::SdrTableObj *>(pPage->GetObj(0UL))".
1248         pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
1249         CPPUNIT_ASSERT( pTableObj );
1250     
1251         css::uno::Any aAny;
1252         uno::Reference< table::XCellRange > xTable;
1253         uno::Reference< beans::XPropertySet > xCell;

** CID 1361582:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/import-tests.cxx: 1071 in SdImportTest::testTableBorderLineStyle()()


________________________________________________________________________________________________________
*** CID 1361582:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/import-tests.cxx: 1071 in SdImportTest::testTableBorderLineStyle()()
1065         uno::Reference< table::XCellRange > xTable;
1066         uno::Reference< beans::XPropertySet > xCell;
1067         table::BorderLine2 aBorderLine;
1068     
1069         for (size_t i = 0; i < SAL_N_ELEMENTS(nObjBorderLineStyles); i++)
1070         {
>>>     CID 1361582:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "pTableObj" = "dynamic_cast <sdr::table::SdrTableObj *>(pPage->GetObj(i))".
1071             pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(i));
1072             CPPUNIT_ASSERT( pTableObj );
1073             xTable.set(pTableObj->getTable(), uno::UNO_QUERY_THROW);
1074             xCell.set(xTable->getCellByPosition(0, 0), uno::UNO_QUERY_THROW);
1075             xCell->getPropertyValue("TopBorder") >>= aBorderLine;
1076             if (aBorderLine.LineWidth > 0) {

** CID 1361581:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/tiledrendering/tiledrendering.cxx: 692 in SdTiledRenderingTest::testResizeTable()()


________________________________________________________________________________________________________
*** CID 1361581:  Null pointer dereferences  (FORWARD_NULL)
/sd/qa/unit/tiledrendering/tiledrendering.cxx: 692 in SdTiledRenderingTest::testResizeTable()()
686         // Load the document.
687         comphelper::LibreOfficeKit::setActive();
688         SdXImpressDocument* pXImpressDocument = createDoc("table.odp");
689         sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
690         SdPage* pActualPage = pViewShell->GetActualPage();
691         SdrObject* pObject = pActualPage->GetObj(0);
>>>     CID 1361581:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "pTableObject" = "dynamic_cast <sdr::table::SdrTableObj *>(pObject)".
692         auto pTableObject = dynamic_cast<sdr::table::SdrTableObj*>(pObject);
693         CPPUNIT_ASSERT(pTableObject);
694     
695         // Select the table by marking it + starting and ending text edit.
696         SdrView* pView = pViewShell->GetView();
697         pView->MarkObj(pObject, pView->GetSdrPageView());

** CID 1361580:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/uiwriter/uiwriter.cxx: 3677 in SwUiWriterTest::testTdf84695()()


________________________________________________________________________________________________________
*** CID 1361580:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/uiwriter/uiwriter.cxx: 3677 in SwUiWriterTest::testTdf84695()()
3671     
3672         // Then select it.
3673         pWrtShell->SelectObj(Point(), 0, pObject);
3674     
3675         // Now Enter + a key should add some text.
3676         SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument *>(mxComponent.get());
>>>     CID 1361580:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pXTextDocument" to "postKeyEvent", which dereferences it. (The dereference happens because this is a virtual function call.)
3677         pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
3678         pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'a', 0);
3679     
3680         uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
3681         // This was empty, Enter did not start the fly frame edit mode.
3682         CPPUNIT_ASSERT_EQUAL(OUString("a"), xShape->getString());

** CID 1361579:  Null pointer dereferences  (FORWARD_NULL)
/xmlsecurity/qa/unit/signing/signing.cxx: 346 in SigningTest::testODFBroken()()


________________________________________________________________________________________________________
*** CID 1361579:  Null pointer dereferences  (FORWARD_NULL)
/xmlsecurity/qa/unit/signing/signing.cxx: 346 in SigningTest::testODFBroken()()
340              || nActual == SignatureState::OK));
341     }
342     
343     void SigningTest::testODFBroken()
344     {
345         createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY) + "bad.odt");
>>>     CID 1361579:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "pBaseModel" = "dynamic_cast <SfxBaseModel *>(this->mxComponent.get())".
346         SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
347         CPPUNIT_ASSERT(pBaseModel);
348         SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
349         CPPUNIT_ASSERT(pObjectShell);
350         CPPUNIT_ASSERT_EQUAL(static_cast<int>(SignatureState::BROKEN), static_cast<int>(pObjectShell->GetDocumentSignatureState()));
351     }

** CID 1361578:  Null pointer dereferences  (FORWARD_NULL)
/xmlsecurity/qa/unit/signing/signing.cxx: 385 in SigningTest::test96097Calc()()


________________________________________________________________________________________________________
*** CID 1361578:  Null pointer dereferences  (FORWARD_NULL)
/xmlsecurity/qa/unit/signing/signing.cxx: 385 in SigningTest::test96097Calc()()
379         CPPUNIT_ASSERT_EQUAL(static_cast<int>(SignatureState::BROKEN), static_cast<int>(pObjectShell->GetDocumentSignatureState()));
380     }
381     
382     void SigningTest::test96097Calc()
383     {
384         createCalc(m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf96097.ods");
>>>     CID 1361578:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "pBaseModel" = "dynamic_cast <SfxBaseModel *>(this->mxComponent.get())".
385         SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
386         CPPUNIT_ASSERT_MESSAGE("Failed to access document base model", pBaseModel);
387     
388         SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
389         CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pObjectShell);
390     

** CID 1361577:  Null pointer dereferences  (FORWARD_NULL)
/xmlsecurity/qa/unit/signing/signing.cxx: 433 in SigningTest::test96097Doc()()


________________________________________________________________________________________________________
*** CID 1361577:  Null pointer dereferences  (FORWARD_NULL)
/xmlsecurity/qa/unit/signing/signing.cxx: 433 in SigningTest::test96097Doc()()
427         }
428     }
429     
430     void SigningTest::test96097Doc()
431     {
432         createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf96097.odt");
>>>     CID 1361577:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "pBaseModel" = "dynamic_cast <SfxBaseModel *>(this->mxComponent.get())".
433         SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
434         CPPUNIT_ASSERT(pBaseModel);
435         SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
436         CPPUNIT_ASSERT(pObjectShell);
437     
438         SignatureState nActual = pObjectShell->GetScriptingSignatureState();

** CID 1361576:  Null pointer dereferences  (FORWARD_NULL)
/xmlsecurity/qa/unit/signing/signing.cxx: 329 in SigningTest::testODFGood()()


________________________________________________________________________________________________________
*** CID 1361576:  Null pointer dereferences  (FORWARD_NULL)
/xmlsecurity/qa/unit/signing/signing.cxx: 329 in SigningTest::testODFGood()()
323         }));
324     }
325     
326     void SigningTest::testODFGood()
327     {
328         createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY) + "good.odt");
>>>     CID 1361576:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "pBaseModel" = "dynamic_cast <SfxBaseModel *>(this->mxComponent.get())".
329         SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
330         CPPUNIT_ASSERT(pBaseModel);
331         SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
332         CPPUNIT_ASSERT(pObjectShell);
333         // We expect NOTVALIDATED in case the root CA is not imported on the system, and OK otherwise, so accept both.
334         SignatureState nActual = pObjectShell->GetDocumentSignatureState();

** CID 1361575:  Control flow issues  (DEADCODE)
/filter/source/msfilter/svdfppt.cxx: 4160 in PPTStyleSheet::PPTStyleSheet(const DffRecordHeader &, SvStream &, SdrPowerPointImport &, const PPTTextCharacterStyleAtomInterpreter &, const PPTTextParagraphStyleAtomInterpreter &, const PPTTextSpecInfo &)()


________________________________________________________________________________________________________
*** CID 1361575:  Control flow issues  (DEADCODE)
/filter/source/msfilter/svdfppt.cxx: 4160 in PPTStyleSheet::PPTStyleSheet(const DffRecordHeader &, SvStream &, SdrPowerPointImport &, const PPTTextCharacterStyleAtomInterpreter &, const PPTTextParagraphStyleAtomInterpreter &, const PPTTextSpecInfo &)()
4154                         {
4155                             mpCharSheet[ TSS_Type::HalfBody ] = new PPTCharSheet( *( mpCharSheet[ TSS_Type::Body ] ) );
4156                             mpParaSheet[ TSS_Type::HalfBody ] = new PPTParaSheet( *( mpParaSheet[ TSS_Type::Body ] ) );
4157                         }
4158                         break;
4159     
>>>     CID 1361575:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach this statement: "case TSS_Type::QuarterBody:".
4160                         case TSS_Type::QuarterBody :
4161                         {
4162                             mpCharSheet[ TSS_Type::QuarterBody ] = new PPTCharSheet( *( mpCharSheet[ TSS_Type::Body ] ) );
4163                             mpParaSheet[ TSS_Type::QuarterBody ] = new PPTParaSheet( *( mpParaSheet[ TSS_Type::Body ] ) );
4164                         }
4165                         break;

** CID 1352302:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/htmlimport/htmlimport.cxx: 91 in testInlinedImagesPageAndParagraph::verify()()


________________________________________________________________________________________________________
*** CID 1352302:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/htmlimport/htmlimport.cxx: 91 in testInlinedImagesPageAndParagraph::verify()()
85             }
86         }
87     }
88     
89     DECLARE_HTMLIMPORT_TEST(testInlinedImagesPageAndParagraph, "PageAndParagraphFilled.html")
90     {
>>>     CID 1352302:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "pTextDoc" = "dynamic_cast <SwXTextDocument *>(this->mxComponent.get())".
91         SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
92         CPPUNIT_ASSERT(pTextDoc);
93     
94         // The document contains embedded pictures inlined for PageBackground and
95         // ParagraphBackground, check for their existence after import
96         SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();

** CID 1352301:  Null pointer dereferences  (FORWARD_NULL)
/sc/qa/unit/subsequent_filters-test.cxx: 2633 in ScFiltersTest::testColorScaleNumWithRefXLSX()()


________________________________________________________________________________________________________
*** CID 1352301:  Null pointer dereferences  (FORWARD_NULL)
/sc/qa/unit/subsequent_filters-test.cxx: 2633 in ScFiltersTest::testColorScaleNumWithRefXLSX()()
2627         CPPUNIT_ASSERT_EQUAL(size_t(1), pFormat->size());
2628         const ScFormatEntry* pEntry = pFormat->GetEntry(0);
2629         CPPUNIT_ASSERT(pEntry);
2630     
2631         CPPUNIT_ASSERT_EQUAL(condformat::COLORSCALE, pEntry->GetType());
2632     
>>>     CID 1352301:  Null pointer dereferences  (FORWARD_NULL)
>>>     Assigning: "pColorScale" = "dynamic_cast <ScColorScaleFormat const *>(pEntry)".
2633         const ScColorScaleFormat* pColorScale= dynamic_cast<const ScColorScaleFormat*>(pEntry);
2634         CPPUNIT_ASSERT(pColorScale);
2635     
2636         const ScColorScaleEntry* pColorScaleEntry = pColorScale->GetEntry(1);
2637         CPPUNIT_ASSERT_EQUAL(OUString("=$A$1"),
2638                 pColorScaleEntry->GetFormula(formula::FormulaGrammar::GRAM_NATIVE));


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

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



More information about the LibreOffice mailing list