New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Wed Aug 18 19:36:21 UTC 2021


Hi,

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

5 new defect(s) introduced to LibreOffice found with Coverity Scan.


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


** CID 1490358:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1490358:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/outdev/bitmap.cxx: 177 in OutputDevice::DrawBitmap(const Point &, const Size &, const Point &, const Size &, const Bitmap &, MetaActionType)()
171                             aBmp.Scale(nScaleX, nScaleY);
172                             aPosAry.mnSrcWidth = aPosAry.mnDestWidth;
173                             aPosAry.mnSrcHeight = aPosAry.mnDestHeight;
174                         }
175                     }
176     
>>>     CID 1490358:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "this->mpGraphics" to "DrawBitmap", which dereferences it.
177                     mpGraphics->DrawBitmap( aPosAry, *aBmp.ImplGetSalBitmap(), *this );
178                 }
179             }
180         }
181     
182         if( mpAlphaVDev )

** CID 1490357:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1490357:  Null pointer dereferences  (FORWARD_NULL)
/starmath/source/mathml/import.cxx: 708 in <unnamed>::SmMLImportContext::inheritStyle()()
702                 aAttribute.setMlForm(&aForm);
703                 m_pElement->setAttribute(aAttribute);
704             }
705         }
706     
707         // Inherit mathvariant
>>>     CID 1490357:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "this->m_pStyle" to "isAttributeSet", which dereferences it.
708         if (m_pStyle->isAttributeSet(SmMlAttributeValueType::MlMathvariant))
709             m_pElement->setAttribute(m_pStyle->getAttribute(SmMlAttributeValueType::MlMathvariant));
710     }
711     
712     void SmMLImportContext::inheritStyleEnd()
713     {

** CID 1490356:  Resource leaks  (RESOURCE_LEAK)
/sc/source/filter/excel/xiescher.cxx: 1860 in XclImpNoteObj::DoPreProcessSdrObj(XclImpDffConverter &, SdrObject &) const()


________________________________________________________________________________________________________
*** CID 1490356:  Resource leaks  (RESOURCE_LEAK)
/sc/source/filter/excel/xiescher.cxx: 1860 in XclImpNoteObj::DoPreProcessSdrObj(XclImpDffConverter &, SdrObject &) const()
1854         // create formatted text
1855         XclImpTextObj::DoPreProcessSdrObj( rDffConv, rSdrObj );
1856         OutlinerParaObject* pOutlinerObj = rSdrObj.GetOutlinerParaObject();
1857         if( maScPos.IsValid() && pOutlinerObj )
1858         {
1859             // create cell note with all data from drawing object
>>>     CID 1490356:  Resource leaks  (RESOURCE_LEAK)
>>>     Failing to save or free storage allocated by "new OutlinerParaObject(pOutlinerObj)" leaks it.
1860             ScNoteUtil::CreateNoteFromObjectData(
1861                 GetDoc(), maScPos,
1862                 rSdrObj.GetMergedItemSet().Clone(),             // new object on heap expected
1863                 new OutlinerParaObject( *pOutlinerObj ),        // new object on heap expected
1864                 rSdrObj.GetLogicRect(),
1865                 ::get_flag( mnNoteFlags, EXC_NOTE_VISIBLE ) );

** CID 1490355:  Control flow issues  (DEADCODE)
/starmath/source/mathml/import.cxx: 114 in SmMLImportWrapper::Import(SfxMedium &)()


________________________________________________________________________________________________________
*** CID 1490355:  Control flow issues  (DEADCODE)
/starmath/source/mathml/import.cxx: 114 in SmMLImportWrapper::Import(SfxMedium &)()
108         {
109             SAL_WARN("starmath", "Failed to fetch sm model while file input");
110             return ERRCODE_SFX_DOLOADFAILED;
111         }
112     
113         // Get doc shell
>>>     CID 1490355:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach the expression "NULL" inside this statement: "this->m_pDocShell = (pModel...".
114         m_pDocShell = pModel ? static_cast<SmDocShell*>(pModel->GetObjectShell()) : nullptr;
115         if (m_pDocShell == nullptr)
116         {
117             SAL_WARN("starmath", "Failed to fetch smdoc shell while file input");
118             return ERRCODE_SFX_DOLOADFAILED;
119         }

** CID 1490354:  Control flow issues  (DEADCODE)
/starmath/source/mathml/import.cxx: 317 in SmMLImportWrapper::Import(std::basic_string_view<char16_t, std::char_traits<char16_t>>)()


________________________________________________________________________________________________________
*** CID 1490354:  Control flow issues  (DEADCODE)
/starmath/source/mathml/import.cxx: 317 in SmMLImportWrapper::Import(std::basic_string_view<char16_t, std::char_traits<char16_t>>)()
311         {
312             SAL_WARN("starmath", "Failed to fetch sm model while file input");
313             return ERRCODE_SFX_DOLOADFAILED;
314         }
315     
316         // Get doc shell
>>>     CID 1490354:  Control flow issues  (DEADCODE)
>>>     Execution cannot reach the expression "NULL" inside this statement: "this->m_pDocShell = (pModel...".
317         m_pDocShell = pModel ? static_cast<SmDocShell*>(pModel->GetObjectShell()) : nullptr;
318         if (m_pDocShell == nullptr)
319         {
320             SAL_WARN("starmath", "Failed to fetch smdoc shell while file input");
321             return ERRCODE_SFX_DOLOADFAILED;
322         }


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DsYXG_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiXyQSClHB-2BRFIbMUo-2B6hxQxjVi6r5AyoLXhKnbZO4V7g3srdk3Tr6AefnBLy4XmKCYtwLVP-2BkhP2bGVJxokGttco5Yet9sF10OoynMM5GCQHWcYI68LUqyVwwObl05jx9RfxrD3skFo4oZ92-2BM9JhhQceMOH02ikPdjQn5kaK15M-3D



More information about the LibreOffice mailing list