New Defects reported by Coverity Scan for LibreOffice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


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


** CID 1604132:  Incorrect expression  (IDENTICAL_BRANCHES)
/vcl/source/gdi/pdfwriter_impl.cxx: 5678 in vcl::PDFWriterImpl::finalizeSignature()()


________________________________________________________________________________________________________
*** CID 1604132:  Incorrect expression  (IDENTICAL_BRANCHES)
/vcl/source/gdi/pdfwriter_impl.cxx: 5678 in vcl::PDFWriterImpl::finalizeSignature()()
5672         if (osl::File::E_None != m_aFile.setPos(osl_Pos_Absolut, m_nSignatureLastByteRangeNoOffset))
5673             return false;
5674         OString aByteRangeNo = OString::number( nLastByteRangeNo ) + " ]";
5675     
5676         if (m_aFile.write(aByteRangeNo.getStr(), aByteRangeNo.getLength(), nWritten) != osl::File::E_None)
5677         {
>>>     CID 1604132:  Incorrect expression  (IDENTICAL_BRANCHES)
>>>     The same code is executed when the condition "osl::FileBase::E_None != this->m_aFile.setPos(1U, nOffset)" is true or false, because the code in the if-then branch and after the if statement is identical. Should the if statement be removed?
5678             if (osl::File::E_None != m_aFile.setPos(osl_Pos_Absolut, nOffset))
5679                 return false;
5680             return false;
5681         }
5682     
5683         // 3- create the PKCS#7 object using NSS

** CID 1604131:  Null pointer dereferences  (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1604131:  Null pointer dereferences  (NULL_RETURNS)
/editeng/source/editeng/impedit3.cxx: 643 in ImpEditEngine::CheckPageOverflow()()
637     
638         sal_uInt32 nParaCount = maParaPortionList.Count();
639         bool bOnlyOneEmptyPara = false;
640         if (nParaCount == 1)
641         {
642             const ParaPortion* pPPortion = GetParaPortions().SafeGetObject(0);
>>>     CID 1604131:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "nullptr" "pPPortion->GetLines()" when calling "Count".
643             bOnlyOneEmptyPara = pPPortion->GetLines().Count() == 1
644                                 && pPPortion->GetLines()[0].GetLen() == 0;
645         }
646     
647         if (nTxtHeight > nBoxHeight && !bOnlyOneEmptyPara)
648         {

** CID 1604130:  Null pointer dereferences  (NULL_RETURNS)


________________________________________________________________________________________________________
*** CID 1604130:  Null pointer dereferences  (NULL_RETURNS)
/editeng/source/editeng/impedit2.cxx: 3697 in ImpEditEngine::GetLineNumberAtIndex(int, int)()
3691         {
3692             // we explicitly allow for the index to point at the character right behind the text
3693             const bool bValidIndex = /*0 <= nIndex &&*/ nIndex <= pNode->Len();
3694             OSL_ENSURE( bValidIndex, "GetLineNumberAtIndex: invalid index" );
3695             const ParaPortion* pPPortion = maParaPortionList.SafeGetObject(nPara);
3696             const EditLineList& rLineList = pPPortion->GetLines();
>>>     CID 1604130:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "nullptr" "rLineList" when calling "Count".
3697             const sal_Int32 nLineCount = rLineList.Count();
3698             if (nIndex == pNode->Len())
3699                 nLineNo = nLineCount > 0 ? nLineCount - 1 : 0;
3700             else if (bValidIndex)   // nIndex < pNode->Len()
3701             {
3702                 sal_Int32 nStart = -1, nEnd = -1;

** CID 1604129:  Uninitialized members  (UNINIT_CTOR)
/codemaker/source/netmaker/netproduce.hxx: 27 in NetProducer::NetProducer()()


________________________________________________________________________________________________________
*** CID 1604129:  Uninitialized members  (UNINIT_CTOR)
/codemaker/source/netmaker/netproduce.hxx: 27 in NetProducer::NetProducer()()
21     class NetProducer
22     {
23     public:
24         NetProducer()
25             : m_manager(new TypeManager())
26         {
>>>     CID 1604129:  Uninitialized members  (UNINIT_CTOR)
>>>     Non-static class member "m_dryRun" is not initialized in this constructor nor in any functions that it calls.
27         }
28     
29     public:
30         void initProducer(const NetOptions& options);
31         void produceAll();
32     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DPf01_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtIRGEEv60TzuPKAbC-2FHJC8ZVnOckoJQj3MLpMp9VmryNlS5E2Ks-2F-2FWMn7c1Xeos6yIe3pRtyyoyvnwExsbfogtgGwZWSoWmmWTjk93q-2FCQn6JafqNsQQbOJJRVq8Q0pdjv1r1-2FBBxDoRUb1o8Y8gYvfl36U-2FzQhoLcr1ShQQRBg4-3D




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux