Hi,

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

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


** CID 1257735:  Logically dead code  (DEADCODE)
/sc/source/filter/excel/xetable.cxx: 2073 in 
XclExpRowBuffer::Finalize(XclExpDefaultRowData &, const std::vector<unsigned 
short, std::allocator<unsigned short>> &)()

** CID 1257736:  Explicit null dereferenced  (FORWARD_NULL)
/sw/source/core/doc/doccomp.cxx: 1929 in 
<unnamed>::SaveMergeRedline::InsertRedline(SwPaM *)()

** CID 1257737:  Dereference null return value  (NULL_RETURNS)
/sw/qa/extras/globalfilter/globalfilter.cxx: 167 in 
Test::testLinkedGraphicRT()()
/sw/qa/extras/globalfilter/globalfilter.cxx: 167 in 
Test::testLinkedGraphicRT()()

** CID 1257738:  Uncaught exception  (UNCAUGHT_EXCEPT)
/vcl/workben/mtfdemo.cxx: 83 in DemoMtfApp::Main()()

** CID 1257739:  Uncaught exception  (UNCAUGHT_EXCEPT)
/vcl/workben/mtfdemo.cxx: 83 in DemoMtfApp::Main()()

** CID 1257740:  Uncaught exception  (UNCAUGHT_EXCEPT)
/vcl/workben/mtfdemo.cxx: 83 in DemoMtfApp::Main()()
/vcl/workben/mtfdemo.cxx: 83 in DemoMtfApp::Main()()

** CID 1257741:  Uninitialized scalar field  (UNINIT_CTOR)
/sc/source/core/data/column.cxx: 3068 in 
<unnamed>::BroadcastBroadcastersHandler::BroadcastBroadcastersHandler(ScHint 
&)()

** CID 1257742:  Uninitialized pointer field  (UNINIT_CTOR)
/vcl/workben/mtfdemo.cxx: 58 in DemoMtfWin::DemoMtfWin(rtl::OUString &)()

** CID 1257743:  Uninitialized pointer field  (UNINIT_CTOR)
/vcl/workben/mtfdemo.cxx: 73 in DemoMtfApp::DemoMtfApp()()


________________________________________________________________________________________________________
*** CID 1257735:  Logically dead code  (DEADCODE)
/sc/source/filter/excel/xetable.cxx: 2073 in 
XclExpRowBuffer::Finalize(XclExpDefaultRowData &, const std::vector<unsigned 
short, std::allocator<unsigned short>> &)()
2067     
2068         // This is staggeringly slow, and each element operates only
2069         // on its own data.
2070         size_t nRows = maRowMap.size();
2071         size_t nThreads = std::max( std::thread::hardware_concurrency(), 
1U );
2072         nThreads = 1; // globally disable multi-threading for now.
>>>     CID 1257735:  Logically dead code  (DEADCODE)
>>>     Execution cannot reach the expression "nRows < 128UL" inside this 
>>> statement: "if (nThreads == 1UL || nRow...".
2073         if ( nThreads == 1 || nRows < 128 )
2074         {
2075             RowMap::iterator itr, itrBeg = maRowMap.begin(), itrEnd = 
maRowMap.end();
2076             for (itr = itrBeg; itr != itrEnd; ++itr)
2077                 itr->second->Finalize( rColXFIndexes, true );
2078         }

________________________________________________________________________________________________________
*** CID 1257736:  Explicit null dereferenced  (FORWARD_NULL)
/sw/source/core/doc/doccomp.cxx: 1929 in 
<unnamed>::SaveMergeRedline::InsertRedline(SwPaM *)()
1923                     case POS_COLLIDE_START:
1924                     case POS_BEHIND:
1925                         break;
1926     
1927                     case POS_INSIDE:
1928                     case POS_EQUAL:
>>>     CID 1257736:  Explicit null dereferenced  (FORWARD_NULL)
>>>     Assigning: "this->pDestRedl" = "NULL".
1929                         delete pDestRedl, pDestRedl = 0;
1930                         // break; -> no break !!!!
1931     
1932                     case POS_COLLIDE_END:
1933                     case POS_BEFORE:
1934                         n = rRedlineTbl.size();

________________________________________________________________________________________________________
*** CID 1257737:  Dereference null return value  (NULL_RETURNS)
/sw/qa/extras/globalfilter/globalfilter.cxx: 167 in 
Test::testLinkedGraphicRT()()
161             // Find the image
162             bool bImageFound = false;
163             for( sal_uLong nIndex = 0; nIndex < aNodes.Count(); ++nIndex)
164             {
165                 if( aNodes[nIndex]->IsGrfNode() )
166                 {
>>>     CID 1257737:  Dereference null return value  (NULL_RETURNS)
>>>     Assigning: "pGrfNode" = null return value from "GetGrfNode".
167                     SwGrfNode* pGrfNode = aNodes[nIndex]->GetGrfNode();
168                     // RT via DOCX makes linked graphic embedded?!
169                     if( aFilterNames[nFilter] != "Office Open XML Text" )
170                     {
171                         CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), 
pGrfNode->IsGrfLink());
172                     }
/sw/qa/extras/globalfilter/globalfilter.cxx: 167 in 
Test::testLinkedGraphicRT()()
161             // Find the image
162             bool bImageFound = false;
163             for( sal_uLong nIndex = 0; nIndex < aNodes.Count(); ++nIndex)
164             {
165                 if( aNodes[nIndex]->IsGrfNode() )
166                 {
>>>     CID 1257737:  Dereference null return value  (NULL_RETURNS)
>>>     Assigning: "pGrfNode" = null return value from "GetGrfNode".
167                     SwGrfNode* pGrfNode = aNodes[nIndex]->GetGrfNode();
168                     // RT via DOCX makes linked graphic embedded?!
169                     if( aFilterNames[nFilter] != "Office Open XML Text" )
170                     {
171                         CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), 
pGrfNode->IsGrfLink());
172                     }

________________________________________________________________________________________________________
*** CID 1257738:  Uncaught exception  (UNCAUGHT_EXCEPT)
/vcl/workben/mtfdemo.cxx: 83 in DemoMtfApp::Main()()
77             fprintf(stderr, "Usage: mtfdemo --help | FILE\n");
78             fprintf(stderr, "A VCL test app that displays Windows 
metafiles\n");
79             std::exit(0);
80         }
81     
82     public:
>>>     CID 1257738:  Uncaught exception  (UNCAUGHT_EXCEPT)
>>>     In function "DemoMtfApp::Main()" an exception of type 
>>> "boost::bad_pointer" is thrown and never caught.
83         virtual int Main() SAL_OVERRIDE
84         {
85             mpWin = new DemoMtfWin(*mpFileName);
86             mpWin->SetText(OUString("Display metafile"));
87     
88             mpWin->Show();

________________________________________________________________________________________________________
*** CID 1257739:  Uncaught exception  (UNCAUGHT_EXCEPT)
/vcl/workben/mtfdemo.cxx: 83 in DemoMtfApp::Main()()
77             fprintf(stderr, "Usage: mtfdemo --help | FILE\n");
78             fprintf(stderr, "A VCL test app that displays Windows 
metafiles\n");
79             std::exit(0);
80         }
81     
82     public:
>>>     CID 1257739:  Uncaught exception  (UNCAUGHT_EXCEPT)
>>>     In function "DemoMtfApp::Main()" an exception of type 
>>> "com::sun::star::uno::DeploymentException" is thrown and never caught.
83         virtual int Main() SAL_OVERRIDE
84         {
85             mpWin = new DemoMtfWin(*mpFileName);
86             mpWin->SetText(OUString("Display metafile"));
87     
88             mpWin->Show();

________________________________________________________________________________________________________
*** CID 1257740:  Uncaught exception  (UNCAUGHT_EXCEPT)
/vcl/workben/mtfdemo.cxx: 83 in DemoMtfApp::Main()()
77             fprintf(stderr, "Usage: mtfdemo --help | FILE\n");
78             fprintf(stderr, "A VCL test app that displays Windows 
metafiles\n");
79             std::exit(0);
80         }
81     
82     public:
>>>     CID 1257740:  Uncaught exception  (UNCAUGHT_EXCEPT)
>>>     In function "DemoMtfApp::Main()" an exception of type 
>>> "com::sun::star::uno::RuntimeException" is thrown and never caught.
83         virtual int Main() SAL_OVERRIDE
84         {
85             mpWin = new DemoMtfWin(*mpFileName);
86             mpWin->SetText(OUString("Display metafile"));
87     
88             mpWin->Show();
/vcl/workben/mtfdemo.cxx: 83 in DemoMtfApp::Main()()
77             fprintf(stderr, "Usage: mtfdemo --help | FILE\n");
78             fprintf(stderr, "A VCL test app that displays Windows 
metafiles\n");
79             std::exit(0);
80         }
81     
82     public:
>>>     CID 1257740:  Uncaught exception  (UNCAUGHT_EXCEPT)
>>>     In function "DemoMtfApp::Main()" an exception of type 
>>> "com::sun::star::uno::RuntimeException" is thrown and never caught.
83         virtual int Main() SAL_OVERRIDE
84         {
85             mpWin = new DemoMtfWin(*mpFileName);
86             mpWin->SetText(OUString("Display metafile"));
87     
88             mpWin->Show();

________________________________________________________________________________________________________
*** CID 1257741:  Uninitialized scalar field  (UNINIT_CTOR)
/sc/source/core/data/column.cxx: 3068 in 
<unnamed>::BroadcastBroadcastersHandler::BroadcastBroadcastersHandler(ScHint 
&)()
3062         ScHint&     mrHint;
3063         ScAddress&  mrAddress;
3064         bool        mbBroadcasted;
3065     
3066     public:
3067         explicit BroadcastBroadcastersHandler( ScHint& rHint ) :
>>>     CID 1257741:  Uninitialized scalar field  (UNINIT_CTOR)
>>>     Non-static class member "mbBroadcasted" is not initialized in this 
>>> constructor nor in any functions that it calls.
3068             mrHint(rHint), mrAddress(mrHint.GetAddress()) {}
3069     
3070         void operator() ( size_t nRow, SvtBroadcaster* pBroadcaster )
3071         {
3072             mrAddress.SetRow(nRow);
3073             pBroadcaster->Broadcast(mrHint);

________________________________________________________________________________________________________
*** CID 1257742:  Uninitialized pointer field  (UNINIT_CTOR)
/vcl/workben/mtfdemo.cxx: 58 in DemoMtfWin::DemoMtfWin(rtl::OUString &)()
52                 ReadWindowMetafile(aFileStream, *mpMtf);
53             }
54             else
55             {
56                 Application::Abort("Can't read metafile");
57             }
>>>     CID 1257742:  Uninitialized pointer field  (UNINIT_CTOR)
>>>     Non-static class member "mpMtf" is not initialized in this constructor 
>>> nor in any functions that it calls.
58         }
59     
60         virtual void Paint( const Rectangle& rRect )  SAL_OVERRIDE;
61     };
62     
63     void DemoMtfWin::Paint( const Rectangle& rRect )

________________________________________________________________________________________________________
*** CID 1257743:  Uninitialized pointer field  (UNINIT_CTOR)
/vcl/workben/mtfdemo.cxx: 73 in DemoMtfApp::DemoMtfApp()()
67         WorkWindow::Paint( rRect );
68     }
69     
70     class DemoMtfApp : public Application
71     {
72         DemoMtfWin *mpWin;
>>>     CID 1257743:  Uninitialized pointer field  (UNINIT_CTOR)
>>>     The compiler-generated constructor for this class does not initialize 
>>> "mpFileName".
73         OUString *mpFileName;
74     
75         void showHelp()
76         {
77             fprintf(stderr, "Usage: mtfdemo --help | FILE\n");
78             fprintf(stderr, "A VCL test app that displays Windows 
metafiles\n");


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

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

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to