New Defects reported by Coverity Scan for LibreOffice

2020-10-20 Thread scan-admin
Hi,

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

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


** CID 1468270:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/vcl/source/outdev/font.cxx: 1362 in 
OutputDevice::ImplGlyphFallbackLayout(std::unique_ptr>, ImplLayoutArgs &) const()



*** CID 1468270:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/vcl/source/outdev/font.cxx: 1362 in 
OutputDevice::ImplGlyphFallbackLayout(std::unique_ptr>, ImplLayoutArgs &) const()
1356 }
1357 
1358 if( pMultiSalLayout && pMultiSalLayout->LayoutText( rLayoutArgs, 
nullptr ) )
1359 pSalLayout = std::move(pMultiSalLayout);
1360 
1361 // restore orig font settings
>>> CID 1468270:  Memory - illegal accesses  (WRAPPER_ESCAPE)
>>> Using invalidated internal representation of parameter "pSalLayout".
1362 pSalLayoutTmp->InitFont();
1363 rLayoutArgs.maRuns = aLayoutRuns;
1364 
1365 return pSalLayout;
1366 }
1367 

** CID 1468269:  Uninitialized members  (UNINIT_CTOR)
/chart2/source/view/charttypes/PieChart.cxx: 868 in 
chart::PieChart::PieLabelInfo::PieLabelInfo()()



*** CID 1468269:  Uninitialized members  (UNINIT_CTOR)
/chart2/source/view/charttypes/PieChart.cxx: 868 in 
chart::PieChart::PieLabelInfo::PieLabelInfo()()
862 }
863 
864 PieChart::PieLabelInfo::PieLabelInfo()
865 : aFirstPosition(), aOrigin(), fValue(0.0)
866 , bMovementAllowed(false), bMoved(false), 
pPrevious(nullptr),pNext(nullptr)
867 {
>>> CID 1468269:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "bShowLeaderLine" is not initialized in this 
>>> constructor nor in any functions that it calls.
868 }
869 
870 /** In case this label and the passed label overlap the routine moves 
this
871  *  label in order to fix the issue. After the label position has been
872  *  rearranged it is checked that the moved label is still inside the 
page
873  *  document, if the test is positive the routine returns true else 
returns



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DVTFN_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiheUZ1vVdQMQ2os-2Fon12rRsYf2GDaY6-2B2MIqJ3bkNeoSmYMsA-2BjaTAvu72rXvG9i-2F-2BdWX9sNsDc3c0cOjDyBoKJWbHgshxe-2BdUs-2FBV1SGjI0HPc2tI-2BQnnwEd8yCjyXrl01eEmKQruKR3GMxZSaJ09MqY-2Bl092Vmj0Pel-2BfWW-2FVMiJVxmpTt7GMTFIwRY7toi

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-10-16 Thread scan-admin
Hi,

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

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


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


** CID 1468188:  Control flow issues  (DEADCODE)
/vcl/source/window/window2.cxx: 1324 in vcl::HasParentDockingWindow(const 
vcl::Window *)()



*** CID 1468188:  Control flow issues  (DEADCODE)
/vcl/source/window/window2.cxx: 1324 in vcl::HasParentDockingWindow(const 
vcl::Window *)()
1318 if( pWindow->IsDockingWindow() )
1319 return true;
1320 
1321 pWindow = pWindow->GetParent();
1322 }
1323 
>>> CID 1468188:  Control flow issues  (DEADCODE)
>>> Execution cannot reach the expression "pWindow->IsDockingWindow()" 
>>> inside this statement: "return pWindow && pWindow->...".
1324 return pWindow && pWindow->IsDockingWindow();
1325 }
1326 
1327 void Window::queue_resize(StateChangedType eReason)
1328 {
1329 if (IsDisposed())



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DK9wX_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi7HQiQX6p4adA5xz-2BtpHfY58Z-2BzvAiz8evzjX3fW2Jah-2BcmRnrHc4ElTIZOKWGigem-2BLlR6Y3mHLHtPAdavn3dLEx3m-2FyIWa6k6KdUxdgKkX5jcCv9WdSOO7huftMBRyBo9S-2FaHYOSq3fSk0kKqaRrOeBtyifd8WNzOrcm8V4GQlpRfnd-2BEIXmItSvRqTDEed

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-10-10 Thread scan-admin
Hi,

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

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


** CID 1467976:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1467976:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/uiview/view0.cxx: 536 in SwView::ExecViewOptions(SfxRequest 
&)()
530 lcl_SetViewMetaChars( *pOpt, bFlag );
531 break;
532 
533 case SID_AUTOSPELL_CHECK:
534 const SfxPoolItem* pItem;
535 
>>> CID 1467976:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pArgs" to "HasItem", which dereferences it.
536 if (pArgs->HasItem(FN_PARAM_1, ))
537 bSet = static_cast(pItem)->GetValue();
538 else if( STATE_TOGGLE == eState )
539 {
540 bFlag = !pOpt->IsOnlineSpell();
541 bSet = bFlag;

** CID 1467975:  Control flow issues  (DEADCODE)
/sc/source/ui/view/editsh.cxx: 313 in ScEditShell::Execute(SfxRequest &)()



*** CID 1467975:  Control flow issues  (DEADCODE)
/sc/source/ui/view/editsh.cxx: 313 in ScEditShell::Execute(SfxRequest &)()
307 {
308 pTableView->Paste();
309 
310 if (pTopView)
311 {
312 pTopView->Paste();
>>> CID 1467975:  Control flow issues  (DEADCODE)
>>> Execution cannot reach the expression "NULL" inside this statement: 
>>> "pViewWindow = (pTopView ? p...".
313 if (vcl::Window* pViewWindow = pTopView ? 
pTopView->GetWindow() : nullptr)
314 pViewWindow->GrabFocus();
315 }
316 }
317 break;
318 

** CID 1467974:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/ui/app/scmod.cxx: 348 in ScModule::Execute(SfxRequest &)()



*** CID 1467974:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/ui/app/scmod.cxx: 348 in ScModule::Execute(SfxRequest &)()
342 case SID_AUTOSPELL_CHECK:
343 {
344 bool bSet;
345 const SfxPoolItem* pItem;
346 if (pReqArgs->HasItem(FN_PARAM_1, ))
347 bSet = static_cast(pItem)->GetValue();
>>> CID 1467974:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pReqArgs" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
348 else if ( pReqArgs && SfxItemState::SET == 
pReqArgs->GetItemState( nSlot, true,  ) )
349 bSet = static_cast(pItem)->GetValue();
350 else
351 {   // Toggle
352 ScDocShell* pDocSh = dynamic_cast( 
SfxObjectShell::Current() );
353 if ( pDocSh )



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D8A35_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiRRa033OGLfDBXYQaXUgmfxy3PdPJy5cNNTfgVZgBL9JpnKfuR2R2380gqTEsSaP6brtCnVq0n5iiAJQVl1HWO89eiXkWdw6HNBkbm18mgrYfkeflt-2F9HwabcvFgXgnMJMOJh8H0uEHvYanxlangi24K8xuqa-2B0D2aYni67YTPkEcRPK5awGfdzkiqu1N9lBe

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-10-09 Thread scan-admin
Hi,

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

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


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


** CID 1467972:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/table/swnewtable.cxx: 2188 in 
SwTable::ConvertSubtableBox(unsigned short, unsigned short)()



*** CID 1467972:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/table/swnewtable.cxx: 2188 in 
SwTable::ConvertSubtableBox(unsigned short, unsigned short)()
2182 {
2183 lastSize.SetHeightSizeType(SwFrameSize::Minimum);
2184 }
2185 pNewLine->GetFrameFormat()->SetFormatAttr(lastSize);
2186 }
2187 SfxPoolItem const* pRowBrush(nullptr);
>>> CID 1467972:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetItemState" without checking return value (as is done 
>>> elsewhere 54 out of 56 times).
2188 rSubLineFormat.GetItemState(RES_BACKGROUND, true, );
2189 GetTabLines().insert(GetTabLines().begin() + nRow + i, 
pNewLine);
2190 for (size_t j = 0; j < pSourceLine->GetTabBoxes().size(); ++j)
2191 {
2192 if (j == nBox)
2193 {

** CID 1467971:  Uninitialized members  (UNINIT_CTOR)
/writerfilter/source/dmapper/DomainMapper_Impl.cxx: 347 in 
writerfilter::dmapper::DomainMapper_Impl::DomainMapper_Impl(writerfilter::dmapper::DomainMapper
 &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, 
writerfilter::dmapper::SourceDocumentType, const utl::MediaDescriptor &)()



*** CID 1467971:  Uninitialized members  (UNINIT_CTOR)
/writerfilter/source/dmapper/DomainMapper_Impl.cxx: 347 in 
writerfilter::dmapper::DomainMapper_Impl::DomainMapper_Impl(writerfilter::dmapper::DomainMapper
 &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, 
writerfilter::dmapper::SourceDocumentType, const utl::MediaDescriptor &)()
341 getTableManager( ).startLevel();
342 m_bUsingEnhancedFields = !utl::ConfigManager::IsFuzzing() && 
officecfg::Office::Common::Filter::Microsoft::Import::ImportWWFieldsAsEnhancedFields::get(m_xComponentContext);
343 
344 m_pSdtHelper = new SdtHelper(*this);
345 
346 m_aRedlines.push(std::vector());
>>> CID 1467971:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_bFrameDirectionSet" is not initialized in 
>>> this constructor nor in any functions that it calls.
347 }
348 
349 
350 DomainMapper_Impl::~DomainMapper_Impl()
351 {
352 ChainTextFrames();



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D9-ff_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiIfvVZU-2BEbYf42r6-2BCIyoflP8f8QWMYJFlnycAt5eyKmwh8c5wz8PvRStXqBZgoMXhcNJFVxvT3DpH4SjXB6PdRNbkVYBRrz4yfRFcFiLbr-2FYtNgViR-2Frt7h68r4HuCzwMjadBkxVIf9so34JTcps4EsliuDw3KamsmSnvWa0IhCPI-2FJIZYho-2F-2B0MZZQP8Zpf

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-10-02 Thread scan-admin
Hi,

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

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


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


** CID 1467667:  Incorrect expression  (DIVIDE_BY_ZERO)
/oox/source/drawingml/diagram/diagramlayoutatoms.cxx: 323 in 
oox::drawingml::SnakeAlg::layoutShapeChildren(const std::map, std::allocator>> &, const 
std::shared_ptr &, const 
std::vector> &)()



*** CID 1467667:  Incorrect expression  (DIVIDE_BY_ZERO)
/oox/source/drawingml/diagram/diagramlayoutatoms.cxx: 323 in 
oox::drawingml::SnakeAlg::layoutShapeChildren(const std::map, std::allocator>> &, const 
std::shared_ptr &, const 
std::vector> &)()
317 for (auto& aCurrShape : rShape->getChildren())
318 {
319 aCurrShape->setPosition(aCurrPos);
320 awt::Size aCurrSize(aChildSize);
321 // aShapeWidths items are a portion of nMaxRowWidth. We 
want the same ratio,
322 // based on the original parent width, ignoring the 
aspect ratio request.
>>> CID 1467667:  Incorrect expression  (DIVIDE_BY_ZERO)
>>> In expression "static_cast(aShapeWidths[index]) / 
>>> nMaxRowWidth", division by expression "nMaxRowWidth" which may be zero has 
>>> undefined behavior.
323 double fWidthFactor = 
static_cast(aShapeWidths[index]) / nMaxRowWidth;
324 bool bWidthsFromConstraints
325 = nCount >= 2 && 
rShape->getChildren()[1]->getDataNodeType() == XML_sibTrans;
326 if (bWidthsFromConstraints)
327 {
328 // We can only work from constraints if spacing is 
represented by a real

** CID 1467666:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 3232 in SwContentTree::UpdateTracking()()



*** CID 1467666:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 3232 in SwContentTree::UpdateTracking()()
3226 if (!((m_bIsRoot && m_nRootType != ContentTypeId::OUTLINE) ||
3227   m_nOutlineTracking == 3 || nActPos == SwOutlineNodes::npos))
3228 {
3229 // assure outline content type is expanded
3230 // this assumes outline content type is first in treeview
3231 std::unique_ptr 
xFirstEntry(m_xTreeView->make_iterator());
>>> CID 1467666:  Error handling issues  (CHECKED_RETURN)
>>> Calling "get_iter_first" without checking return value (as is done 
>>> elsewhere 101 out of 107 times).
3232 m_xTreeView->get_iter_first(*xFirstEntry);
3233 m_xTreeView->expand_row(*xFirstEntry);
3234 
3235 m_xTreeView->all_foreach([this, nActPos](weld::TreeIter& 
rEntry){
3236 bool bRet = false;
3237 if (lcl_IsContent(rEntry, *m_xTreeView) && 
reinterpret_cast(

** CID 1467665:  Incorrect expression  (DIVIDE_BY_ZERO)
/oox/source/drawingml/diagram/diagramlayoutatoms.cxx: 255 in 
oox::drawingml::SnakeAlg::layoutShapeChildren(const std::map, std::allocator>> &, const 
std::shared_ptr &, const 
std::vector> &)()



*** CID 1467665:  Incorrect expression  (DIVIDE_BY_ZERO)
/oox/source/drawingml/diagram/diagramlayoutatoms.cxx: 255 in 
oox::drawingml::SnakeAlg::layoutShapeChildren(const std::map, std::allocator>> &, const 
std::shared_ptr &, const 
std::vector> &)()
249 {
250 break;
251 }
252 
253 nRowWidth += aShapeWidths[i];
254 }
>>> CID 1467665:  Incorrect expression  (DIVIDE_BY_ZERO)
>>> In expression "fShapeHeight * nRow / nRowWidth", division by expression 
>>> "nRowWidth" which may be zero has undefined behavior.
255 if ((fShapeHeight * nRow) / nRowWidth >= fAspectRatio)
256 {
257 if (nRowWidth > nMaxRowWidth)
258 {
259 nMaxRowWidth = nRowWidth;
260 }



To view the defects in Coverity Scan visit, 

New Defects reported by Coverity Scan for LibreOffice

2020-09-25 Thread scan-admin
Hi,

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

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


** CID 1467440:  Error handling issues  (UNCAUGHT_EXCEPT)
/desktop/source/app/app.cxx: 1227 in desktop::Desktop::Main()()



*** CID 1467440:  Error handling issues  (UNCAUGHT_EXCEPT)
/desktop/source/app/app.cxx: 1227 in desktop::Desktop::Main()()
1221 };
1222 
1223 }
1224 
1225 static ExecuteGlobals* pExecGlobals = nullptr;
1226 
>>> CID 1467440:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> In function "desktop::Desktop::Main()" an exception of type 
>>> "std::runtime_error" is thrown and never caught.
1227 int Desktop::Main()
1228 {
1229 pExecGlobals = new ExecuteGlobals();
1230 
1231 // Remember current context object
1232 css::uno::ContextLayer layer( css::uno::getCurrentContext() );



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DvnrE_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiPnnZVNY28Pkt6Ei0Sna41gBL76VL-2Bgo-2F-2B-2BV04K9kwj0UudCAbB4LSwFAPFLuLETlQi-2FyW9cdmqELtzT-2FO503CPEyEXZNnwNwIsWK9Pzq3smyYC-2FnAITDwGjZLsm6jIAeTkxvr4iHl-2FuEhtQsHB7MsWzEOsirRkIsUcsB9mQTZw-2BHL4i3Hpd2D153Uvun3ja5

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-09-23 Thread scan-admin
Hi,

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

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


** CID 1467434:  Resource leaks  (RESOURCE_LEAK)
/sal/cppunittester/cppunittester.cxx: 314 in 
::ProtectedFixtureFunctor::run() const()



*** CID 1467434:  Resource leaks  (RESOURCE_LEAK)
/sal/cppunittester/cppunittester.cxx: 314 in 
::ProtectedFixtureFunctor::run() const()
308 boost::split(test_names, pVal, boost::is_any_of("\t "));
309 CppUnit::Test* pTest = 
CppUnit::TestFactoryRegistry::getRegistry().makeTest();
310 bool const added(addRecursiveTests(test_names, pTest, 
runner));
311 if (!added)
312 {
313 std::cerr << "\nFatal error: CPPUNIT_TEST_NAME 
contains no valid tests\n";
>>> CID 1467434:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "manager" going out of scope leaks the storage it points to.
314 return false;
315 }
316 }
317 else
318 {
319 
runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest());

** CID 1467433:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1467433:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/uibase/docvw/AnnotationWin.cxx: 450 in 
sw::annotation::SwAnnotationWin::InitAnswer(const OutlinerParaObject *)()
444 
445 //collect our old meta data
446 SwAnnotationWin* pWin = mrMgr.GetNextPostIt(KEY_PAGEUP, this);
447 const SvtSysLocale aSysLocale;
448 const LocaleDataWrapper& rLocalData = aSysLocale.GetLocaleData();
449 SwRewriter aRewriter;
>>> CID 1467433:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pWin" when calling 
>>> "GetAuthor".
450 aRewriter.AddRule(UndoArg1, pWin->GetAuthor());
451 const OUString aText = aRewriter.Apply(SwResId(STR_REPLY))
452 + " (" + rLocalData.getDate( pWin->GetDate())
453 + ", " + rLocalData.getTime( pWin->GetTime(), false)
454 + "): \"";
455 GetOutlinerView()->InsertText(aText);



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DhzdU_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi1tdR4BoZvedyCSgAyZMLvKXxcD3xMmpjbefYy7SGNWRcFrsWe-2BbLcOTkl8ofcyYLQ08lkAXHI7LkRx7SihPHSDHBgyoBvichSbE3fp1LWAMAWW6PR-2BxkNKRwJ24AjY96SR7KM1uMBpqZQnax7u20e7pSNxdU2sJYbS8LTiZWUuUI1QaNGyWCHPZ1dWROdrvZ

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2020-09-22 Thread Caolán McNamara
On Tue, 2020-09-22 at 09:59 +0200, Stephan Bergmann wrote:
> On 22/09/2020 01:16, scan-ad...@coverity.com wrote:
> > 4 new defect(s) introduced to LibreOffice found with Coverity Scan.
> > 249 defect(s), reported by Coverity Scan earlier, were marked fixed
> > in the recent build analyzed by Coverity Scan.
> 
> So how did we get rid of all the PARSE_ERRORs introduced with 

I cheated. Unlike the normal coverity warnings which are generated
serverside the parse errors can be seen in the local build log so I
checked if building with 121771e37f7e2de41cd5643475861062bf25627b made
a difference, and seeing as it seemed to work I extended it to the rest
of those cases before making a build that was submitted serverside.

https://gerrit.libreoffice.org/c/core/+/103147

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2020-09-22 Thread Stephan Bergmann

On 22/09/2020 01:16, scan-ad...@coverity.com wrote:

4 new defect(s) introduced to LibreOffice found with Coverity Scan.
249 defect(s), reported by Coverity Scan earlier, were marked fixed in the 
recent build analyzed by Coverity Scan.


So how did we get rid of all the PARSE_ERRORs introduced with 
 
"Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString"?


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-09-21 Thread scan-admin
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.
249 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 4 of 4 defect(s)


** CID 1467075:  Error handling issues  (CHECKED_RETURN)
/chart2/source/controller/dialogs/DialogModel.cxx: 680 in 
chart::DialogModel::detectArguments(rtl::OUString &, bool &, bool &, bool &) 
const()



*** CID 1467075:  Error handling issues  (CHECKED_RETURN)
/chart2/source/controller/dialogs/DialogModel.cxx: 680 in 
chart::DialogModel::detectArguments(rtl::OUString &, bool &, bool &, bool &) 
const()
674 try
675 {
676 uno::Sequence< sal_Int32 > aSequenceMapping;//todo YYYX
677 
678 // Note: unused data is currently not supported in being passed 
to detectRangeSegmentation
679 if( m_xChartDocument.is())
>>> CID 1467075:  Error handling issues  (CHECKED_RETURN)
>>> Calling "detectRangeSegmentation" without checking return value (as is 
>>> done elsewhere 7 out of 8 times).
680 DataSourceHelper::detectRangeSegmentation(
681 Reference< frame::XModel >( m_xChartDocument, 
uno::UNO_QUERY_THROW ),
682 rOutRangeString, aSequenceMapping, rOutUseColumns, 
rOutFirstCellAsLabel, rOutHasCategories );
683 }
684 catch( const uno::Exception & )
685 {

** CID 1448510:(TAINTED_SCALAR)



*** CID 1448510:(TAINTED_SCALAR)
/sw/source/filter/ww8/docxattributeoutput.cxx: 7043 in 
DocxAttributeOutput::EmbedFontStyle(const rtl::OUString &, int, FontFamily, 
FontItalic, FontWeight, FontPitch)()
7037 xOutStream->closeOutput();
7038 return;
7039 }
7040 if( readSize == 0 )
7041 break;
7042 // coverity[overrun-buffer-arg : FALSE] - coverity has 
difficulty with css::uno::Sequence
>>> CID 1448510:(TAINTED_SCALAR)
>>> Passing tainted variable "buffer" to a tainted sink.
7043 xOutStream->writeBytes( uno::Sequence< sal_Int8 >( 
reinterpret_cast< const sal_Int8* >( buffer ), readSize ));
7044 }
7045 xOutStream->closeOutput();
7046 OString relId = OUStringToOString( 
GetExport().GetFilter().addRelation( m_pSerializer->getOutputStream(),
7047 oox::getRelationship(Relationship::FONT),
7048 "fonts/font" + OUString::number( m_nextFontId ) + ".odttf" 
), RTL_TEXTENCODING_UTF8 );
/sw/source/filter/ww8/docxattributeoutput.cxx: 7022 in 
DocxAttributeOutput::EmbedFontStyle(const rtl::OUString &, int, FontFamily, 
FontItalic, FontWeight, FontPitch)()
7016  i < 16;
7017  ++i )
7018 {
7019 buffer[ i ] ^= fontKey[ i ];
7020 buffer[ i + 16 ] ^= fontKey[ i ];
7021 }
>>> CID 1448510:(TAINTED_SCALAR)
>>> Passing tainted variable "buffer" to a tainted sink.
7022 xOutStream->writeBytes( uno::Sequence< sal_Int8 >( 
reinterpret_cast< const sal_Int8* >( buffer ), 32 ));
7023 for(;;)
7024 {
7025 sal_Bool eof;
7026 if( file.isEndOfFile(  ) != osl::File::E_None )
7027 {

** CID 1448420:  Insecure data handling  (TAINTED_SCALAR)



*** CID 1448420:  Insecure data handling  (TAINTED_SCALAR)
/ucb/source/ucp/file/filtask.cxx: 648 in fileaccess::TaskManager::page(int, 
const rtl::OUString &, const 
com::sun::star::uno::Reference &)()
642 do
643 {
644 err = aFile.read( static_cast(BFF),bfz,nrc );
645 if(  err == osl::FileBase::E_None )
646 {
647 // coverity[overrun-buffer-arg : FALSE] - coverity has 
difficulty with css::uno::Sequence
>>> CID 1448420:  Insecure data handling  (TAINTED_SCALAR)
>>> Passing tainted variable "BFF" to a tainted sink.
648 uno::Sequence< sal_Int8 > seq( BFF, 
static_cast(nrc) );
649 try
650 {
651 xOutputStream->writeBytes( seq );
652 }
653 catch (const io::NotConnectedException&)

** CID 1448292:  Insecure data handling  (TAINTED_SCALAR)



*** CID 1448292:  Insecure data handling  (TAINTED_SCALAR)
/xmloff/source/style/XMLFontAutoStylePool.cxx: 646 in 

Re: New Defects reported by Coverity Scan for LibreOffice

2020-09-21 Thread Stephan Bergmann

On 20/09/2020 13:32, Caolán McNamara wrote:

On Tue, 2020-09-08 at 15:45 +0200, Stephan Bergmann wrote:

On 08/09/2020 11:13, scan-ad...@coverity.com wrote:

  CID 1466649:  Parse warnings  (PARSE_ERROR)
  class template name must be a placeholder for the
complete type being initialized (not for a component of that
type)

25 const OStringLiteral sGlobal("::");



I have contacted Coverity about the above PARSE_ERROR problem.


I notice that while global "const OStringLiteral" and "const
OUStringLiteral" give PARSE_ERROR that non-const global
"OStringLiteral" and "OUStringLiteral" do not


Lets see whether  "Make 
some OUStringLiteral vars constexpr" would similarly get rid of those 
unhelpful error messages.


(By the way,


Some recent change in the LibreOffice source code caused Scan to fail with


Unrecoverable parse warning (PARSE_ERROR)
1. modified_class_template_placeholder: class template name must be a 
placeholder for the complete type being initialized (not for a component of 
that type)


in four places:

* 

* 

* 

* 


That OStringLiteral is a class template, see 
,
 and these four global variable definitions rely on class template argument deduction.  
There are similar definitions of static variables in function bodies, see 
,
 for which Scan did not report errors.

Any chance to get this fixed in Scan, or some workaround/annotation that can be applied to the code?  Many more instances of this pattern are scheduled to hit the LibreOffice code base soon, and I would like to get this issue sorted out first. 


is what I had sent to , but without any 
response.  And then I completely forgot about this issue when submitting 
 
"Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString", 
which caused many more of those errors now.)


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2020-09-20 Thread Caolán McNamara
On Tue, 2020-09-08 at 15:45 +0200, Stephan Bergmann wrote:
> On 08/09/2020 11:13, scan-ad...@coverity.com wrote:
> > > > >  CID 1466649:  Parse warnings  (PARSE_ERROR)
> > > > >  class template name must be a placeholder for the
> > > > > complete type being initialized (not for a component of that
> > > > > type)
> > 25 const OStringLiteral sGlobal("::");

> I have contacted Coverity about the above PARSE_ERROR problem.

I notice that while global "const OStringLiteral" and "const
OUStringLiteral" give PARSE_ERROR that non-const global
"OStringLiteral" and "OUStringLiteral" do not

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-09-20 Thread scan-admin
Hi,

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

200 new defect(s) introduced to LibreOffice found with Coverity Scan.
1 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 200 defect(s)


** CID 1467018:  Parse warnings  (PARSE_ERROR)
/xmloff/source/text/txtparae.cxx: 131 in ()



*** CID 1467018:  Parse warnings  (PARSE_ERROR)
/xmloff/source/text/txtparae.cxx: 131 in ()
125 using namespace ::xmloff;
126 using namespace ::xmloff::token;
127 
128 // Implement Title/Description Elements UI (#i73249#)
129 const OUStringLiteral gsTitle(u"Title");
130 const OUStringLiteral gsDescription(u"Description");
>>> CID 1467018:  Parse warnings  (PARSE_ERROR)
>>> class template name must be a placeholder for the complete type being 
>>> initialized (not for a component of that type)
131 const OUStringLiteral gsAnchorPageNo(u"AnchorPageNo");
132 const OUStringLiteral gsAnchorType(u"AnchorType");
133 const OUStringLiteral gsBookmark(u"Bookmark");
134 const OUStringLiteral gsChainNextName(u"ChainNextName");
135 const OUStringLiteral gsContourPolyPolygon(u"ContourPolyPolygon");
136 const OUStringLiteral gsDocumentIndexMark(u"DocumentIndexMark");

** CID 1467017:  Parse warnings  (PARSE_ERROR)
/xmloff/source/script/XMLScriptContextFactory.cxx: 36 in ()



*** CID 1467017:  Parse warnings  (PARSE_ERROR)
/xmloff/source/script/XMLScriptContextFactory.cxx: 36 in ()
30 using ::com::sun::star::xml::sax::XAttributeList;
31 using ::com::sun::star::beans::PropertyValue;
32 using ::com::sun::star::uno::Reference;
33 using ::com::sun::star::uno::Sequence;
34 
35 const OUStringLiteral gsEventType(u"EventType");
>>> CID 1467017:  Parse warnings  (PARSE_ERROR)
>>> class template name must be a placeholder for the complete type being 
>>> initialized (not for a component of that type)
36 const OUStringLiteral gsScript(u"Script");
37 const OUStringLiteral gsURL(u"Script");
38 
39 XMLScriptContextFactory::XMLScriptContextFactory()
40 {
41 }

** CID 1467016:  Parse warnings  (PARSE_ERROR)
/sc/source/filter/oox/pagesettings.cxx: 476 in ()



*** CID 1467016:  Parse warnings  (PARSE_ERROR)
/sc/source/filter/oox/pagesettings.cxx: 476 in ()
470 
471 } // namespace
472 
473 const OUStringLiteral gaPageNumberService( 
u"com.sun.star.text.TextField.PageNumber" );
474 const OUStringLiteral gaPageCountService( 
u"com.sun.star.text.TextField.PageCount" );
475 const OUStringLiteral gaSheetNameService( 
u"com.sun.star.text.TextField.SheetName" );
>>> CID 1467016:  Parse warnings  (PARSE_ERROR)
>>> class template name must be a placeholder for the complete type being 
>>> initialized (not for a component of that type)
476 const OUStringLiteral gaFileNameService( 
u"com.sun.star.text.TextField.FileName" );
477 const OUStringLiteral gaDateTimeService( 
u"com.sun.star.text.TextField.DateTime" );
478 
479 HeaderFooterParser::HeaderFooterParser( const WorkbookHelper& rHelper ) 
:
480 WorkbookHelper( rHelper ),
481 maBoldNames( sppcBoldNames, sppcBoldNames + 
SAL_N_ELEMENTS(sppcBoldNames) ),

** CID 1467015:  Parse warnings  (PARSE_ERROR)
/sfx2/source/doc/doctemplateslocal.cxx: 38 in ()



*** CID 1467015:  Parse warnings  (PARSE_ERROR)
/sfx2/source/doc/doctemplateslocal.cxx: 38 in ()
32 
33 namespace
34 {
35 
36 // Relations info related strings
37 const OUStringLiteral 
g_sGroupListElement(u"groupuinames:template-group-list");
>>> CID 1467015:  Parse warnings  (PARSE_ERROR)
>>> class template name must be a placeholder for the complete type being 
>>> initialized (not for a component of that type)
38 const OUStringLiteral g_sGroupElement(u"groupuinames:template-group");
39 const OUStringLiteral g_sNameAttr(u"groupuinames:name");
40 const OUStringLiteral g_sUINameAttr(u"groupuinames:default-ui-name");
41 
42 }
43 

** CID 1467014:  Parse warnings  (PARSE_ERROR)
/xmlscript/source/xml_helper/xml_impctx.cxx: 164 in ()



*** CID 1467014:  Parse warnings  (PARSE_ERROR)
/xmlscript/source/xml_helper/xml_impctx.cxx: 164 in ()
158 virtual OUString SAL_CALL getUriByUid( sal_Int32 Uid ) override;
159 };
160 
161 }
162 
163 

New Defects reported by Coverity Scan for LibreOffice

2020-09-12 Thread scan-admin
Hi,

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

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


** CID 1466690:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/core/tool/address.cxx: 820 in lcl_ScRange_Parse_XL_R1C1(ScRange &, 
const char16_t *, const ScDocument *, const ScAddress::Details &, bool, 
ScAddress::ExternalInfo *, int *)()



*** CID 1466690:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/core/tool/address.cxx: 820 in lcl_ScRange_Parse_XL_R1C1(ScRange &, 
const char16_t *, const ScDocument *, const ScAddress::Details &, bool, 
ScAddress::ExternalInfo *, int *)()
814 }
815 
816 nFlags |=
817 ScRefFlags::COL_VALID | ScRefFlags::COL2_VALID |
818 ScRefFlags::COL_ABS | ScRefFlags::COL2_ABS;
819 r.aStart.SetCol( 0 );
>>> CID 1466690:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pDoc" suggests that it may be null, but it has already 
>>> been dereferenced on all paths leading to the check.
820 r.aEnd.SetCol( pDoc ? pDoc->MaxCol() : MAXCOL );
821 
822 return bOnlyAcceptSingle ? ScRefFlags::ZERO : nFlags;
823 }
824 else if( nullptr == (p = lcl_r1c1_get_col( p, rDetails, 
,  )))
825 {



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DcqmW_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJilkXVRoVEhjx-2FipOwg7SDZhKeQY6vCU3ap5qTmDrPVnBfGT7cMqJoDOwLoX0S0sUM9PqsSA8SjmUIU-2F-2Br8E4yZ6GbC2n3ioTZIPGIbUF4fBz8DcNtFJXhibUkeFNj4WOawd8Dk9Tq3iK4U6gsHME6t7uABLRfM0RwDT95Z9n3ARjrH9YlZU-2FH-2F1-2FhDiqEYKae

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-09-09 Thread scan-admin
Hi,

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

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


** CID 147:  Null pointer dereferences  (NULL_RETURNS)



*** CID 147:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/core/doc/DocumentContentOperationsManager.cxx: 3047 in 
sw::DocumentContentOperationsManager::InsertDrawObj(const SwPaM &, SdrObject &, 
const SfxItemSet &)()
3041 {
3042 // apply anchor format
3043 SwFormatAnchor aAnch( pAnchor != nullptr ? *pAnchor : 
pFormat->GetAnchor() );
3044 eAnchorId = aAnch.GetAnchorId();
3045 if ( eAnchorId == RndStdIds::FLY_AT_FLY )
3046 {
>>> CID 147:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" 
>>> "rRg->GetNode(true)->FindFlyStartNode()" when calling "SwPosition".
3047 SwPosition aPos( *rRg.GetNode().FindFlyStartNode() );
3048 aAnch.SetAnchor(  );
3049 }
3050 else
3051 {
3052 aAnch.SetAnchor( rRg.GetPoint() );



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3Dd0MO_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJizsfscrjHdpOjEL-2Bu9nQaUDVeaEe2t4TF9kO0BXuwSixxUchqzfQuw42Kiog8BmT4V6OZcGcpAdMfF5R-2BUmCOfw4hwr34-2BLsRztSVqLypg6SrzztY1TbZLqpDvgDLfGDSiznmyUkZoRgXFAga3TGahB2z9WMVKZPWQeZnkLad-2BGSc5em-2Ft30vseA9uX-2BGqD1i

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2020-09-08 Thread Stephan Bergmann

On 08/09/2020 11:13, scan-ad...@coverity.com wrote:
[...]

** CID 141:  Parse warnings  (PARSE_ERROR)
/dbaccess/source/ui/dlg/dbfindex.cxx: 39 in ()



*** CID 141:  Parse warnings  (PARSE_ERROR)
/dbaccess/source/ui/dlg/dbfindex.cxx: 39 in ()
33 namespace dbaui
34 {
35 using namespace ::com::sun::star::uno;
36 using namespace ::com::sun::star::ucb;
37 using namespace ::svt;
38

 CID 141:  Parse warnings  (PARSE_ERROR)
 class template name must be a placeholder for the complete type being 
initialized (not for a component of that type)

39 const OStringLiteral aGroupIdent("dBase III");
40
41
42 ODbaseIndexDialog::ODbaseIndexDialog(weld::Window * pParent, const 
OUString& aDataSrcName)
43 : GenericDialogController(pParent, "dbaccess/ui/dbaseindexdialog.ui", 
"DBaseIndexDialog")
44 , m_aDSN(aDataSrcName)


[...]

** CID 1466653:  Parse warnings  (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 267 in ()



*** CID 1466653:  Parse warnings  (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 267 in ()
261 return bHasBracket;
262 }
263
264 } // namespace
265
266 const OStringLiteral gaOpeningCData( "" );
268
269 InputStream::InputStream( const Reference< XComponentContext >& rxContext, const 
Reference< XInputStream >& rxInStrm ) :
270 // use single-byte ISO-8859-1 encoding which maps all byte 
characters to the first 256 Unicode characters
271 mxTextStrm( TextInputStream::createXTextInputStream( rxContext, 
rxInStrm, RTL_TEXTENCODING_ISO_8859_1 ) ),
272 maOpeningBracket( 1 ),


[...]

** CID 1466650:  Parse warnings  (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 266 in ()



*** CID 1466650:  Parse warnings  (PARSE_ERROR)
/oox/source/vml/vmlinputstream.cxx: 266 in ()
260
261 return bHasBracket;
262 }
263
264 } // namespace
265

 CID 1466650:  Parse warnings  (PARSE_ERROR)
 class template name must be a placeholder for the complete type being 
initialized (not for a component of that type)

266 const OStringLiteral gaOpeningCData( "" );
268
269 InputStream::InputStream( const Reference< XComponentContext >& rxContext, const 
Reference< XInputStream >& rxInStrm ) :
270 // use single-byte ISO-8859-1 encoding which maps all byte 
characters to the first 256 Unicode characters
271 mxTextStrm( TextInputStream::createXTextInputStream( rxContext, 
rxInStrm, RTL_TEXTENCODING_ISO_8859_1 ) ),

** CID 1466649:  Parse warnings  (PARSE_ERROR)
/idlc/source/astdeclaration.cxx: 25 in ()



*** CID 1466649:  Parse warnings  (PARSE_ERROR)
/idlc/source/astdeclaration.cxx: 25 in ()
19
20 #include 
21 #include 
22 #include 
23 #include 
24

 CID 1466649:  Parse warnings  (PARSE_ERROR)
 class template name must be a placeholder for the complete type being 
initialized (not for a component of that type)

25 const OStringLiteral sGlobal("::");
26
27 static OString convertName(const OString& name)
28 {
29 OStringBuffer nameBuffer(name.getLength()+1);
30 sal_Int32 nIndex = 0;

I have contacted Coverity about the above PARSE_ERROR problem.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-09-08 Thread scan-admin
Hi,

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

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


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


** CID 142:  Resource leaks  (RESOURCE_LEAK)
/svx/source/gallery2/galexpl.cxx: 63 in GalleryExplorer::FillObjList(const 
rtl::OUString &, std::vector> &)()



*** CID 142:  Resource leaks  (RESOURCE_LEAK)
/svx/source/gallery2/galexpl.cxx: 63 in GalleryExplorer::FillObjList(const 
rtl::OUString &, std::vector> &)()
57 SfxListener aListener;
58 GalleryTheme*   pTheme = pGal->AcquireTheme( rThemeName, 
aListener );
59 
60 if( pTheme )
61 {
62 for( sal_uInt32 i = 0, nCount = pTheme->GetObjectCount(); i 
< nCount; i++ )
>>> CID 142:  Resource leaks  (RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "pTheme->GetObjectURL(i)" 
>>> leaks it.
63 rObjList.push_back( pTheme->GetObjectURL( i 
).GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
64 
65 pGal->ReleaseTheme( pTheme, aListener );
66 }
67 }
68 

** CID 141:  Parse warnings  (PARSE_ERROR)
/dbaccess/source/ui/dlg/dbfindex.cxx: 39 in ()



*** CID 141:  Parse warnings  (PARSE_ERROR)
/dbaccess/source/ui/dlg/dbfindex.cxx: 39 in ()
33 namespace dbaui
34 {
35 using namespace ::com::sun::star::uno;
36 using namespace ::com::sun::star::ucb;
37 using namespace ::svt;
38 
>>> CID 141:  Parse warnings  (PARSE_ERROR)
>>> class template name must be a placeholder for the complete type being 
>>> initialized (not for a component of that type)
39 const OStringLiteral aGroupIdent("dBase III");
40 
41 
42 ODbaseIndexDialog::ODbaseIndexDialog(weld::Window * pParent, const 
OUString& aDataSrcName)
43 : GenericDialogController(pParent, 
"dbaccess/ui/dbaseindexdialog.ui", "DBaseIndexDialog")
44 , m_aDSN(aDataSrcName)

** CID 140:  Performance inefficiencies  (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 3922 in 
std::find_if<__gnu_cxx::__normal_iterator>>, 
SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const 
SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const 
SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const 
DataRowPointStyle &) (instance 1)]>(T1, T1, T2)()



*** CID 140:  Performance inefficiencies  (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 3922 in 
std::find_if<__gnu_cxx::__normal_iterator>>, 
SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, const 
SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const 
SchXMLImportHelper &, const SvXMLImport &, bool, bool, bool)::[lambda(const 
DataRowPointStyle &) (instance 1)]>(T1, T1, T2)()
3916*  @return   The first iterator @c i in the range @p 
[__first,__last)
3917*  such that @p __pred(*i) is true, or @p __last if no such 
iterator exists.
3918   */
3919   template
3920 inline _InputIterator
3921 find_if(_InputIterator __first, _InputIterator __last,
>>> CID 140:  Performance inefficiencies  (PASS_BY_VALUE)
>>> Passing parameter __pred of type 
>>> "SchXMLSeries2Context::setStylesToDataPoints(SeriesDefaultsAndStyles &, 
>>> SvXMLStylesContext const *, SvXMLStyleContext const *&, rtl::OUString &, 
>>> SchXMLImportHelper const &, SvXMLImport const &, bool, bool, 
>>> bool)::[lambda(DataRowPointStyle const &) (instance 1)]" (size 136 bytes) 
>>> by value.
3922_Predicate __pred)
3923 {
3924   // concept requirements
3925   
__glibcxx_function_requires(_InputIteratorConcept<_InputIterator>)
3926   __glibcxx_function_requires(_UnaryPredicateConcept<_Predicate,
3927  typename iterator_traits<_InputIterator>::value_type>)

** CID 1466659:  Performance inefficiencies  (PASS_BY_VALUE)
/usr/include/c++/8/bits/stl_algo.h: 3922 in 
std::find_if<__gnu_cxx::__normal_iterator>>, 
SchXMLSeries2Context::setStylesToSeries(SeriesDefaultsAndStyles &, const 
SvXMLStylesContext *, const SvXMLStyleContext *&, rtl::OUString &, const 
SchXMLImportHelper &, const SvXMLImport &, bool, std::multimap, 
com::sun::star::uno::Reference,
 std::less>, 
std::allocator, 
com::sun::star::uno::Reference>>>
 &)::[lambda(const DataRowPointStyle &) (instance 1)]>(T1, T1, T2)()



*** CID 1466659:  Performance inefficiencies  

New Defects reported by Coverity Scan for LibreOffice

2020-09-01 Thread scan-admin
Hi,

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

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


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


** CID 1466575:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1466575:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/core/text/txtfld.cxx: 482 in 
checkApplyParagraphMarkFormatToNumbering(SwFont *, SwTextFormatInfo &, const 
IDocumentSettingAccess *, const SwAttrSet *)()
476 && !pCleanedSet->HasItem(nWhich)
477 && !(pFormat && pFormat->HasItem(nWhich)) )
478 {
479 // Copy from parent sets only allowed items which will 
not overwrite
480 // values explicitly defined in current set 
(pCleanedSet) or in pFormat
481 const SfxPoolItem* pItem = rStyleAttrs.GetItem(nWhich, 
true);
>>> CID 1466575:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pItem" when calling 
>>> "Put".
482 pCleanedSet->Put(*pItem);
483 }
484 nWhich = aIter.NextWhich();
485 }
486 
487 // It is not required here anymore, all referenced items are 
inserted

** CID 1466574:  Uninitialized members  (UNINIT_CTOR)
/xmloff/source/draw/XMLNumberStyles.cxx: 599 in 
SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext(SdXMLImport &, 
int, SvXMLNumImpData *, SvXMLStylesTokens, const 
com::sun::star::uno::Reference &, 
SvXMLStylesContext &)()



*** CID 1466574:  Uninitialized members  (UNINIT_CTOR)
/xmloff/source/draw/XMLNumberStyles.cxx: 599 in 
SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext(SdXMLImport &, 
int, SvXMLNumImpData *, SvXMLStylesTokens, const 
com::sun::star::uno::Reference &, 
SvXMLStylesContext &)()
593 OUString sValue = aIter.toString();
594 if( aIter.getToken() == XML_ELEMENT(NUMBER, 
XML_AUTOMATIC_ORDER) )
595 mbAutomatic = IsXMLToken( sValue, XML_TRUE );
596 else
597 SAL_WARN("xmloff", "unknown attribute " << 
SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << 
aIter.toString());
598 }
>>> CID 1466574:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mnElements" is not initialized in this 
>>> constructor nor in any functions that it calls.
599 }
600 
601 SdXMLNumberFormatImportContext::~SdXMLNumberFormatImportContext()
602 {
603 }
604 

** CID 1466573:  Null pointer dereferences  (FORWARD_NULL)
/i18npool/source/textconversion/textconversion_zh.cxx: 228 in 
i18npool::TextConversion_zh::getWordConversion(const rtl::OUString &, int, int, 
bool, int, com::sun::star::uno::Sequence &)()



*** CID 1466573:  Null pointer dereferences  (FORWARD_NULL)
/i18npool/source/textconversion/textconversion_zh.cxx: 228 in 
i18npool::TextConversion_zh::getWordConversion(const rtl::OUString &, int, int, 
bool, int, com::sun::star::uno::Sequence &)()
222 if (result < 0)
223 top = current - 1;
224 else if (result > 0)
225 bottom = current + 1;
226 else {
227 if (toSChinese)   // Traditionary/Simplified 
conversion,
>>> CID 1466573:  Null pointer dereferences  (FORWARD_NULL)
>>> Dereferencing null pointer "wordData".
228 for (current = entry[current]-1; current > 
0 && wordData[current-1]; current--) ;
229 else  // Simplified/Traditionary conversion, 
forwards search for next word
230 current = entry[current] + word.getLength() 
+ 1;
231 sal_Int32 start=current;
232 if (offset.hasElements()) {
233 if (word.getLength() != 
OUString([current]).getLength())



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3D5GMp_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiGVeRp6G7YmBGTqa9yZi0l3CmubIs-2B6Dqe84bBdC02FnsTv2nj8mSRil18NHCakTJcv09Pm2GuGubj1jTqjAgcto-2BQcGOQfyhqR2w9S1ABDN5YuwwV2tVSjsyj-2Bv15mifNt7-2F2aVaCuQy-2BkltxCDfmySLjWQhKDEP2VaH652SXI-2FJsaXbPTscipE3LpPdYZuj


New Defects reported by Coverity Scan for LibreOffice

2020-08-22 Thread scan-admin
Hi,

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

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


** CID 1466265:  Control flow issues  (DEADCODE)
/sw/source/uibase/config/StoredChapterNumbering.cxx: 354 in 
swStoredChapterNumberingRootContext::createFastChildContext(int, 
const 
com::sun::star::uno::Reference 
&)()



*** CID 1466265:  Control flow issues  (DEADCODE)
/sw/source/uibase/config/StoredChapterNumbering.cxx: 354 in 
swStoredChapterNumberingRootContext::createFastChildContext(int, 
const 
com::sun::star::uno::Reference 
&)()
348 else if (Element == XML_ELEMENT(STYLE, XML_STYLE))
349 {
350 return new 
StoredChapterNumberingDummyStyleContext(GetImport(), xAttrList);
351 }
352 else if (Element == XML_ELEMENT(TEXT, XML_OUTLINE_STYLE))
353 {
>>> CID 1466265:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "++this->m_nCounter;".
354 ++m_nCounter;
355 if (m_nCounter <= SwChapterNumRules::nMaxRules)
356 {
357 SvxXMLListStyleContext *const pContext(
358 new SvxXMLListStyleContext(GetImport(),
359 Element, xAttrList, true));

** CID 1466264:(NULL_RETURNS)
/cui/source/tabpages/border.cxx: 887 in 
SvxBorderTabPage::FillItemSet(SfxItemSet *)()
/cui/source/tabpages/border.cxx: 904 in 
SvxBorderTabPage::FillItemSet(SfxItemSet *)()



*** CID 1466264:(NULL_RETURNS)
/cui/source/tabpages/border.cxx: 849 in 
SvxBorderTabPage::FillItemSet(SfxItemSet *)()
843 bool bAttrsChanged = false;
844 
845 SfxItemPool* pPool = rCoreAttrs->GetPool();
846 
847 if (m_aFrameSel.IsBorderEnabled(svx::FrameBorderType::TLBR))
848 {
>>> CID 1466264:(NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" 
>>> "static_cast(this->GetOldItem(rCoreAttrs, 11013, 
>>> true))" when calling "SvxLineItem".
849 SvxLineItem aLineItem(*static_cast(GetOldItem(*rCoreAttrs, SID_ATTR_BORDER_DIAG_TLBR)));
850 
aLineItem.SetLine(m_aFrameSel.GetFrameBorderStyle(svx::FrameBorderType::TLBR));
851 rCoreAttrs->Put(aLineItem);
852 bAttrsChanged = true;
853 }
854 
/cui/source/tabpages/border.cxx: 887 in 
SvxBorderTabPage::FillItemSet(SfxItemSet *)()
881 {
882 sal_uInt16 nMergeAdjacentBordersId = 
pPool->GetWhich(SID_SW_COLLAPSING_BORDERS);
883 rCoreAttrs->ClearItem(nMergeAdjacentBordersId);
884 }
885 else
886 {
>>> CID 1466264:(NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" 
>>> "this->GetOldItem(rCoreAttrs, 11011, true)" when calling "Clone". (The 
>>> dereference happens because this is a virtual function call.)
887 std::unique_ptr 
xNewItem(static_cast(GetOldItem(*rCoreAttrs, 
SID_SW_COLLAPSING_BORDERS)->Clone()));
888 xNewItem->SetValue(static_cast(nState));
889 rCoreAttrs->Put(std::move(xNewItem));
890 }
891 bAttrsChanged = true;
892 }
/cui/source/tabpages/border.cxx: 904 in 
SvxBorderTabPage::FillItemSet(SfxItemSet *)()
898 {
899 sal_uInt16 nMergeWithNextId = 
pPool->GetWhich(SID_ATTR_BORDER_CONNECT);
900 rCoreAttrs->ClearItem(nMergeWithNextId);
901 }
902 else
903 {
>>> CID 1466264:(NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" 
>>> "this->GetOldItem(rCoreAttrs, 10990, true)" when calling "Clone". (The 
>>> dereference happens because this is a virtual function call.)
904 std::unique_ptr 
xNewItem(static_cast(GetOldItem(*rCoreAttrs, 
SID_ATTR_BORDER_CONNECT)->Clone()));
905 xNewItem->SetValue(static_cast(nState));
906 rCoreAttrs->Put(std::move(xNewItem));
907 }
908 bAttrsChanged = true;
909 }
/cui/source/tabpages/border.cxx: 873 in 
SvxBorderTabPage::FillItemSet(SfxItemSet *)()
867 bAttrsChanged = true;
868 }
869 
870 if (m_xMarginControls && 
m_xMarginControls->get_value_changed_from_saved())
871 {
872 const SvxMarginItem& rOldMarginItem = *static_cast(GetOldItem(*rCoreAttrs, SID_ATTR_ALIGN_MARGIN));
>>> CID 1466264:(NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" 

New Defects reported by Coverity Scan for LibreOffice

2020-08-20 Thread scan-admin
Hi,

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

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


** CID 1466206:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/fontsubset/sft.cxx: 1482 in vcl::TrueTypeFont::TrueTypeFont(const 
char *)()



*** CID 1466206:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/fontsubset/sft.cxx: 1482 in vcl::TrueTypeFont::TrueTypeFont(const 
char *)()
1476 , subfamily(nullptr)
1477 , usubfamily(nullptr)
1478 , ntables(0)
1479 , cmap(nullptr)
1480 , cmapType(0)
1481 {
>>> CID 1466206:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mapper" is not initialized in this constructor 
>>> nor in any functions that it calls.
1482 }
1483 
1484 TrueTypeFont::~TrueTypeFont()
1485 {
1486 #if !defined(_WIN32)
1487 if (fileName())

** CID 1466205:  Control flow issues  (DEADCODE)
/sc/source/ui/drawfunc/fuins1.cxx: 414 in 
FuInsertMedia::FuInsertMedia(ScTabViewShell &, vcl::Window *, ScDrawView *, 
SdrModel *, const SfxRequest &)()



*** CID 1466205:  Control flow issues  (DEADCODE)
/sc/source/ui/drawfunc/fuins1.cxx: 414 in 
FuInsertMedia::FuInsertMedia(ScTabViewShell &, vcl::Window *, ScDrawView *, 
SdrModel *, const SfxRequest &)()
408 if( !::avmedia::MediaWindow::isMediaURL( aURL, ""/*TODO?*/, true, 
 ) )
409 {
410 if( pWin )
411 pWin->LeaveWait();
412 
413 if( !bAPI )
>>> CID 1466205:  Control flow issues  (DEADCODE)
>>> Execution cannot reach the expression "executeFormatErrorBox" inside 
>>> this statement: "avmedia::MediaWindow::execu...".
414 ::avmedia::MediaWindow::executeFormatErrorBox(pWindow ? 
pWindow->GetFrameWeld() : nullptr);
415 }
416 else
417 #endif
418 {
419 lcl_InsertMedia( aURL, bAPI, , pWindow, pView, 
aPrefSize,

** CID 1466204:  Error handling issues  (CHECKED_RETURN)
/filter/source/msfilter/escherex.cxx: 697 in 
EscherPropertyContainer::CreateTextProperties(const 
com::sun::star::uno::Reference &, unsigned 
int, bool, bool)()



*** CID 1466204:  Error handling issues  (CHECKED_RETURN)
/filter/source/msfilter/escherex.cxx: 697 in 
EscherPropertyContainer::CreateTextProperties(const 
com::sun::star::uno::Reference &, unsigned 
int, bool, bool)()
691 // used with ashapes:
692 bool bWordWrap  ( false );
693 bool bAutoGrowSize  ( false );
694 
695 uno::Any aTextWrap;
696 
>>> CID 1466204:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetPropertyValue" without checking return value (as is done 
>>> elsewhere 36 out of 37 times).
697 EscherPropertyValueHelper::GetPropertyValue(aTextWrap, rXPropSet, 
"TextWrap", true);
698 
699 if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, 
"TextWritingMode", true ) )
700 aAny >>= eWM;
701 if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, 
"TextVerticalAdjust", true ) )
702 aAny >>= eVA;



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DQJFt_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJitL6hbzJTuudawmxwn8rYJ9nhUe6GxyteRKPfywzEybGxoKlEGgqBLishMpMhTdLDd9B-2BLNZK7NoZKFAjVaKZiwk9HhJOfh2TGm-2BPJnwD50IgFNMxmaosMXl9Ssv0nQ2HscQ-2BtBlQ8vzRhvQGf1QZZzcJvw3a51Y7vIqn-2F3i1Xd9eTh9MCkyG8CqCVccsBbol

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2020-08-07 Thread Caolán McNamara
On Fri, 2020-08-07 at 08:17 +0200, Stephan Bergmann wrote:
> 
> The above CIDs 1462308--1462314, 1462316, and 1462318 all appear to 
> center on the false assumption that TYPELIB_DANGER_GET 
> (include/typelib/typedescription.h) could destroy its
> *ppMacroTypeDescr argument (while it will actually only shave off an
> excess refcount via typelib_typedescription_release).
> 
> Question is whether there is a good way to centrally teach Coverity
> Scan about its false assumption there.

It's probable that we had all these before and marked them manually in
the coverity UI as false positive but loplugin:flatten (or somethine
like that) changed the code enough that coverity doesn't recognize it
as the same code anymore and warns about them again.

I don't know a good way to inline mark these up to avoid the warning,
but they are manually set as ignored again and so shouldn't appear in
the next run.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2020-08-07 Thread Stephan Bergmann

On 06/08/2020 22:33, scan-ad...@coverity.com wrote:

** CID 1462318:  Memory - illegal accesses  (USE_AFTER_FREE)



*** CID 1462318:  Memory - illegal accesses  (USE_AFTER_FREE)
/bridges/source/jni_uno/jni_java2uno.cxx: 218 in jni_uno::Bridge::call_uno(const 
jni_uno::JNI_context &, _uno_Interface *, _typelib_TypeDescription *, 
_typelib_TypeDescriptionReference *, int, const _typelib_MethodParameter *, 
_jobjectArray *) const()
212 {
213 JLocalAutoRef jo_arg(
214 jni, jni->GetObjectArrayElement( jo_args, nPos ) );
215 jni.ensure_no_exception();
216 jvalue java_arg;
217 java_arg.l = jo_arg.get();

 CID 1462318:  Memory - illegal accesses  (USE_AFTER_FREE)
 Calling "map_to_uno" dereferences freed pointer "type".

218 map_to_uno(
219 jni, uno_args[ nPos ], java_arg, type, nullptr,
220 false /* no assign */, param.bOut,
221 true /* special wrapped integral types */ );
222 }
223 catch (...)

** CID 1462316:(USE_AFTER_FREE)
/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx: 491 in 
Proxy::dispatch(_typelib_TypeDescriptionReference *, _typelib_MethodParameter 
*, int, const _typelib_TypeDescription *, void *, void **, _uno_Any **)()



*** CID 1462316:(USE_AFTER_FREE)
/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx: 457 in 
Proxy::dispatch(_typelib_TypeDescriptionReference *, _typelib_MethodParameter 
*, int, const _typelib_TypeDescription *, void *, void **, _uno_Any **)()
451 }
452 uno_Environment_invoke(m_to.get(), 
s_type_destructData_v, args[nPos], param.pTypeRef, 0);
453 }
454 }
455 if (ret != pReturn)
456 {

 CID 1462316:(USE_AFTER_FREE)
 Calling "uno_type_copyAndConvertData" dereferences freed pointer 
"pReturnTypeRef".

457 uno_type_copyAndConvertData(pReturn,
458 ret,
459 pReturnTypeRef,
460 m_to_from.get());
461
462 uno_Environment_invoke(m_to.get(), s_type_destructData_v, 
ret, pReturnTypeRef, 0);
/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx: 491 in 
Proxy::dispatch(_typelib_TypeDescriptionReference *, _typelib_MethodParameter 
*, int, const _typelib_TypeDescription *, void *, void **, _uno_Any **)()
485
486 // FIXME: need to destruct in m_to
487 uno_any_destruct(exc, nullptr);
488 }
489
490 if (m_probeFun)

 CID 1462316:(USE_AFTER_FREE)
 Passing freed pointer "pReturnTypeRef" as an argument to 
"*this->m_probeFun".

491 m_probeFun(false,
492this,
493m_pProbeContext,
494pReturnTypeRef,
495pParams,
496nParams,

** CID 1462314:  Memory - illegal accesses  (USE_AFTER_FREE)



*** CID 1462314:  Memory - illegal accesses  (USE_AFTER_FREE)
/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx: 78 in 
cpp2uno_call(bridges::cpp_uno::shared::CppInterfaceProxy *, const 
_typelib_TypeDescription *, _typelib_TypeDescriptionReference *, int, 
_typelib_MethodParameter *, void **, void **, void **, unsigned long *)()
72
73 void * pUnoReturn = nullptr;
74 void * pCppReturn = nullptr; // complex return ptr: if != 0 && != 
pUnoReturn, reconversion need
75
76 if ( pReturnTypeDescr )
77 {

 CID 1462314:  Memory - illegal accesses  (USE_AFTER_FREE)
 Calling "return_in_hidden_param" dereferences freed pointer 
"pReturnTypeRef".

78 if ( x86_64::return_in_hidden_param( pReturnTypeRef ) )
79 {
80 pCppReturn = *gpreg++;
81 nr_gpr++;
82
83 pUnoReturn = ( 
bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )

** CID 1462313:  Memory - illegal accesses  (USE_AFTER_FREE)
/bridges/source/jni_uno/jni_data.cxx: 1047 in jni_uno::Bridge::map_to_uno(const 
jni_uno::JNI_context &, void *, jvalue, _typelib_TypeDescriptionReference *, 
const jni_uno::JNI_type_info *, bool, bool, bool) const()



*** CID 1462313:  Memory - illegal accesses  (USE_AFTER_FREE)
/bridges/source/jni_uno/jni_data.cxx: 1047 in jni_uno::Bridge::map_to_uno(const 
jni_uno::JNI_context &, void *, jvalue, 

New Defects reported by Coverity Scan for LibreOffice

2020-08-06 Thread scan-admin
Hi,

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

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


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


** CID 1465676:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx: 68 in 
SwOutlineContentVisibilityWin::Set()()



*** CID 1465676:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx: 68 in 
SwOutlineContentVisibilityWin::Set()()
62 Hide();
63 return;
64 }
65 const SwTextNode* pTextNode = pTextFrame->GetTextNodeFirst();
66 SwWrtShell& rSh = GetEditWin()->GetView().GetWrtShell();
67 const SwOutlineNodes& rOutlineNodes = rSh.GetNodes().GetOutLineNds();
>>> CID 1465676:  Error handling issues  (CHECKED_RETURN)
>>> Calling "Seek_Entry" without checking return value (as is done 
>>> elsewhere 23 out of 26 times).
68 
rOutlineNodes.Seek_Entry(static_cast(const_cast(pTextNode)),
69  _nOutlinePos);
70 assert(m_nOutlinePos != SwOutlineNodes::npos);
71 
72 // don't set if no content and no subs with content
73 auto nPos = m_nOutlinePos;

** CID 1465675:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx: 41 in 
SwOutlineContentVisibilityWin::SwOutlineContentVisibilityWin(SwEditWin *, const 
SwFrame *)()



*** CID 1465675:  Uninitialized members  (UNINIT_CTOR)
/sw/source/uibase/docvw/OutlineContentVisibilityWin.cxx: 41 in 
SwOutlineContentVisibilityWin::SwOutlineContentVisibilityWin(SwEditWin *, const 
SwFrame *)()
35 , m_bDestroyed(false)
36 {
37 SetSizePixel(Size(BUTTON_WIDTH, BUTTON_HEIGHT));
38 
39 m_aDelayTimer.SetTimeout(50);
40 m_aDelayTimer.SetInvokeHandler(LINK(this, 
SwOutlineContentVisibilityWin, DelayHandler));
>>> CID 1465675:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_nOutlinePos" is not initialized in this 
>>> constructor nor in any functions that it calls.
41 }
42 
43 void SwOutlineContentVisibilityWin::dispose()
44 {
45 m_bDestroyed = true;
46 m_aDelayTimer.Stop();

** CID 1465674:  Incorrect expression  (COPY_PASTE_ERROR)
/vcl/opengl/RenderList.cxx: 243 in RenderList::addDrawRectangle(long, long, 
long, long, double, Color, Color)()



*** CID 1465674:  Incorrect expression  (COPY_PASTE_ERROR)
/vcl/opengl/RenderList.cxx: 243 in RenderList::addDrawRectangle(long, long, 
long, long, double, Color, Color)()
237 fX1 - 0.5f, fY2 - 0.5f, fX2 + 0.5f, fY2 + 0.5f, 
nLineColor, fTransparency);
238 }
239 
240 if (nFillColor == SALCOLOR_NONE)
241 return;
242 
>>> CID 1465674:  Incorrect expression  (COPY_PASTE_ERROR)
>>> "nLineColor" looks like a copy-paste error.
243 if (nLineColor == SALCOLOR_NONE)
244 {
245 appendRectangle(rRenderParameter.maVertices, 
rRenderParameter.maIndices,
246 fX1 - 0.5f, fY1 - 0.5f, fX1 + 0.5f, fY2 + 0.5f, 
nFillColor, fTransparency);
247 appendRectangle(rRenderParameter.maVertices, 
rRenderParameter.maIndices,
248 fX1 - 0.5f, fY1 - 0.5f, fX2 + 0.5f, fY1 + 0.5f, 
nFillColor, fTransparency);

** CID 1465673:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/querydesign/ConnectionLine.cxx: 90 in 
::calcPointsYValue(const dbaui::OTableWindow *, int, Point &, Point 
&)()



*** CID 1465673:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/querydesign/ConnectionLine.cxx: 90 in 
::calcPointsYValue(const dbaui::OTableWindow *, int, Point &, Point 
&)()
84 _rNewConPos.setY( _pWin->GetPosPixel().Y() );
85 if (_nEntry != -1)
86 {
87 _rNewConPos.AdjustY(pListBox->GetPosPixel().Y() );
88 const weld::TreeView& rTreeView = pListBox->get_widget();
89 std::unique_ptr xEntry = 
rTreeView.make_iterator();
>>> CID 1465673:  Error handling issues  (CHECKED_RETURN)
>>> Calling "get_iter_first" without checking return value (as is done 
>>> elsewhere 88 out of 94 times).
90 rTreeView.get_iter_first(*xEntry);
91 rTreeView.iter_nth_sibling(*xEntry, _nEntry);
92 auto nEntryPos = 
rTreeView.get_row_area(*xEntry).Center().Y();
93 
94 if( nEntryPos >= 0 )
95 

New Defects reported by Coverity Scan for LibreOffice

2020-07-25 Thread scan-admin
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 1465512:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/vcl/source/control/edit.cxx: 208 in Edit::set_property(const rtl::OString &, 
const rtl::OUString &)()



*** CID 1465512:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/vcl/source/control/edit.cxx: 208 in Edit::set_property(const rtl::OString &, 
const rtl::OUString &)()
202 mbPassword = true;
203 }
204 else if (rKey == "placeholder-text")
205 SetPlaceholderText(rValue);
206 else if (rKey == "shadow-type")
207 {
>>> CID 1465512:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
>>> "this->GetStyle() | 8L /* WB_BORDER */" is always 1/true regardless of 
>>> the values of its operand. This occurs as the logical operand of "if".
208 if (GetStyle() | WB_BORDER)
209 SetBorderStyle(rValue == "none" ? WindowBorderStyle::MONO : 
WindowBorderStyle::NORMAL);
210 }
211 else
212 return Control::set_property(rKey, rValue);
213 return true;

** CID 1465511:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1465511:  Null pointer dereferences  (NULL_RETURNS)
/toolkit/source/awt/vclxwindows.cxx: 5957 in VCLXMetricField::setProperty(const 
rtl::OUString &, const com::sun::star::uno::Any &)()
5951 case BASEPROPERTY_NUMSHOWTHOUSANDSEP:
5952 {
5953 bool b = false;
5954 if ( Value >>= b )
5955 {
5956 NumericFormatter* pNumericFormatter = 
static_cast(GetFormatter());
>>> CID 1465511:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pNumericFormatter" 
>>> when calling "SetUseThousandSep".
5957 pNumericFormatter->SetUseThousandSep( b );
5958 }
5959 }
5960 break;
5961 case BASEPROPERTY_UNIT:
5962 {

** CID 1465510:(NULL_RETURNS)



*** CID 1465510:(NULL_RETURNS)
/toolkit/source/awt/vclxwindows.cxx: 5653 in 
VCLXNumericField::setProperty(const rtl::OUString &, const 
com::sun::star::uno::Any &)()
5647 {
5648 case BASEPROPERTY_VALUE_DOUBLE:
5649 {
5650 if ( bVoid )
5651 {
5652 NumericFormatter* pNumericFormatter = 
static_cast(GetFormatter());
>>> CID 1465510:(NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pNumericFormatter" 
>>> when calling "EnableEmptyFieldValue".
5653 pNumericFormatter->EnableEmptyFieldValue( true );
5654 pNumericFormatter->SetEmptyFieldValue();
5655 }
5656 else
5657 {
5658 double d = 0;
/toolkit/source/awt/vclxwindows.cxx: 5698 in 
VCLXNumericField::setProperty(const rtl::OUString &, const 
com::sun::star::uno::Any &)()
5692 case BASEPROPERTY_NUMSHOWTHOUSANDSEP:
5693 {
5694 bool b = bool();
5695 if ( Value >>= b )
5696 {
5697 NumericFormatter* pNumericFormatter = 
static_cast(GetFormatter());
>>> CID 1465510:(NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pNumericFormatter" 
>>> when calling "SetUseThousandSep".
5698 pNumericFormatter->SetUseThousandSep( b );
5699 }
5700 }
5701 break;
5702 default:
5703 {

** CID 1465509:  Uninitialized members  (UNINIT_CTOR)
/cui/source/inc/AdditionsDialog.hxx: 43 in 
AdditionsItem::AdditionsItem(weld::Widget *)()



*** CID 1465509:  Uninitialized members  (UNINIT_CTOR)
/cui/source/inc/AdditionsDialog.hxx: 43 in 
AdditionsItem::AdditionsItem(weld::Widget *)()
37 , m_xImageVoting(m_xBuilder->weld_image("imageVoting"))
38 , 
m_xImageDownloadNumber(m_xBuilder->weld_image("imageDownloadNumber"))
39 , 
m_xLabelDownloadNumber(m_xBuilder->weld_label("labelDownloadNumber"))
40 , m_xButtonShowMore(m_xBuilder->weld_button("buttonShowMore"))
41 {
42 

New Defects reported by Coverity Scan for LibreOffice

2020-07-18 Thread scan-admin
Hi,

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

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


** CID 1465260:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 79 in 
svx::sidebar::InspectorTextPanel::updateEntries(const 
std::vector> &)()



*** CID 1465260:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 79 in 
svx::sidebar::InspectorTextPanel::updateEntries(const 
std::vector> &)()
73 pTreeDiagram->all_foreach([pTreeDiagram](weld::TreeIter& rEntry) {
74 pTreeDiagram->expand_row(rEntry);
75 return false;
76 });
77 
78 std::unique_ptr pEntry = 
mpListBoxStyles->make_iterator();
>>> CID 1465260:  Error handling issues  (CHECKED_RETURN)
>>> Calling "get_iter_first" without checking return value (as is done 
>>> elsewhere 85 out of 91 times).
79 mpListBoxStyles->get_iter_first(*pEntry);
80 mpListBoxStyles->iter_next(*pEntry);
81 mpListBoxStyles->collapse_row(*pEntry); // Collapse "Default 
Paragraph Style"
82 }
83 
84 InspectorTextPanel::~InspectorTextPanel() { disposeOnce(); }

** CID 1465257:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 80 in 
svx::sidebar::InspectorTextPanel::updateEntries(const 
std::vector> &)()



*** CID 1465257:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 80 in 
svx::sidebar::InspectorTextPanel::updateEntries(const 
std::vector> &)()
74 pTreeDiagram->expand_row(rEntry);
75 return false;
76 });
77 
78 std::unique_ptr pEntry = 
mpListBoxStyles->make_iterator();
79 mpListBoxStyles->get_iter_first(*pEntry);
>>> CID 1465257:  Error handling issues  (CHECKED_RETURN)
>>> Calling "iter_next" without checking return value (as is done elsewhere 
>>> 77 out of 79 times).
80 mpListBoxStyles->iter_next(*pEntry);
81 mpListBoxStyles->collapse_row(*pEntry); // Collapse "Default 
Paragraph Style"
82 }
83 
84 InspectorTextPanel::~InspectorTextPanel() { disposeOnce(); }
85 



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DlOVo_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiIBpAznbzgneZpXuB0BFjgy83ui9RVkXwiRH3ReS-2FWsVFaWnBvaz26AuSsPfKEvXESqFbxX53gscsDRO-2BxlcmiDMQK11wIclgOljIGPOY0lyZ-2F1BIevZzljNgKr9gHwrz9Xt2LITiTO6Y6zj1gH1WeFCzsKT-2FWxpj26p86kRyLObEkv0xINNiZ0b-2F7pA3icqy

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-07-13 Thread scan-admin
Hi,

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

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


** CID 1465274:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/ui/view/gridwin4.cxx: 1288 in 
::ScLOKDrawView::ScLOKDrawView(OutputDevice *, ScViewData *)()



*** CID 1465274:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/ui/view/gridwin4.cxx: 1288 in 
::ScLOKDrawView::ScLOKDrawView(OutputDevice *, ScViewData *)()
1282 
1283 class ScLOKDrawView : public FmFormView
1284 {
1285 public:
1286 ScLOKDrawView(OutputDevice* pOut, ScViewData* pData) :
1287 FmFormView(*pData->GetDocument()->GetDrawLayer(), pOut),
>>> CID 1465274:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pData" suggests that it may be null, but it has already 
>>> been dereferenced on all paths leading to the check.
1288 pScDrawView(pData ? pData->GetScDrawView() : nullptr)
1289 {
1290 }
1291 
1292 virtual sdr::contact::ObjectContact* 
createViewSpecificObjectContact(
1293 SdrPageWindow& rPageWindow, const sal_Char* 
pDebugName) const override



To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DwbSe_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJik7oR5c12ZsGmQ-2BaI7lqDly-2FV6KbvXaVS3bLctYBJ8POlLiOFRsCtXoT2shlb9XPcgIwBggi-2FKSm3nNoLPoBZ0xEocxnDgsKKLKMwkItkQaLV4bPxFheDJWA-2B9V2X1Nl8MrSEnPuHPh-2B4-2BaxCbmtLsdvXt4isO-2FstzfIQ9b4L8HLYvG65scC9j4LE-2FK-2BmnoGo

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-07-11 Thread scan-admin
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.
19 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 1465260:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 79 in 
svx::sidebar::InspectorTextPanel::updateEntries(const 
std::vector> &)()



*** CID 1465260:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 79 in 
svx::sidebar::InspectorTextPanel::updateEntries(const 
std::vector> &)()
73 pTreeDiagram->all_foreach([pTreeDiagram](weld::TreeIter& rEntry) {
74 pTreeDiagram->expand_row(rEntry);
75 return false;
76 });
77 
78 std::unique_ptr xEntry = 
mxListBoxStyles->make_iterator();
>>> CID 1465260:  Error handling issues  (CHECKED_RETURN)
>>> Calling "get_iter_first" without checking return value (as is done 
>>> elsewhere 85 out of 91 times).
79 mxListBoxStyles->get_iter_first(*xEntry);
80 mxListBoxStyles->iter_next(*xEntry);
81 mxListBoxStyles->collapse_row(*xEntry); // Collapse "Default 
Paragraph Style"
82 }
83 
84 InspectorTextPanel::~InspectorTextPanel() { disposeOnce(); }

** CID 1465259:  API usage errors  (SWAPPED_ARGUMENTS)



*** CID 1465259:  API usage errors  (SWAPPED_ARGUMENTS)
/editeng/source/editeng/impedit.cxx: 150 in 
LOKSpecialPositioning::GetWindowPos(const tools::Rectangle &, MapUnit) const()
144 {
145 aRect = tools::Rectangle(aPos, aSz);
146 }
147 else
148 {
149 Point aNewPos(aPos.X() - aSz.Height(), aPos.Y());
>>> CID 1465259:  API usage errors  (SWAPPED_ARGUMENTS)
>>> The positions of arguments in the constructor for "Size" do not match 
>>> the ordering of the parameters:
* "aSz.Height()" is passed to "nWidth"
* "aSz.Width()" is passed to "nHeight"
150 aRect = tools::Rectangle(aNewPos, Size(aSz.Height(), 
aSz.Width()));
151 }
152 return aRect;
153 }
154 
155 Point LOKSpecialPositioning::convertUnit(const Point& rPos, MapUnit 
ePosUnit) const

** CID 1465258:  Uninitialized members  (UNINIT_CTOR)
/svtools/source/brwbox/ebbcontrols.cxx: 391 in 
svt::EditControlBase::EditControlBase(BrowserDataWin *)()



*** CID 1465258:  Uninitialized members  (UNINIT_CTOR)
/svtools/source/brwbox/ebbcontrols.cxx: 391 in 
svt::EditControlBase::EditControlBase(BrowserDataWin *)()
385 m_pWidget = pWidget;
386 }
387 
388 EditControlBase::EditControlBase(BrowserDataWin* pParent)
389 : ControlBase(pParent, "svt/ui/thineditcontrol.ui", 
"EditControl") // *thin*editcontrol has no frame/border
390 {
>>> CID 1465258:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_pEntry" is not initialized in this 
>>> constructor nor in any functions that it calls.
391 }
392 
393 void EditControlBase::InitEditControlBase(weld::Entry* pEntry)
394 {
395 InitControlBase(pEntry);
396 m_pEntry = pEntry;

** CID 1465257:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 80 in 
svx::sidebar::InspectorTextPanel::updateEntries(const 
std::vector> &)()



*** CID 1465257:  Error handling issues  (CHECKED_RETURN)
/svx/source/sidebar/inspector/InspectorTextPanel.cxx: 80 in 
svx::sidebar::InspectorTextPanel::updateEntries(const 
std::vector> &)()
74 pTreeDiagram->expand_row(rEntry);
75 return false;
76 });
77 
78 std::unique_ptr xEntry = 
mxListBoxStyles->make_iterator();
79 mxListBoxStyles->get_iter_first(*xEntry);
>>> CID 1465257:  Error handling issues  (CHECKED_RETURN)
>>> Calling "iter_next" without checking return value (as is done elsewhere 
>>> 77 out of 79 times).
80 mxListBoxStyles->iter_next(*xEntry);
81 mxListBoxStyles->collapse_row(*xEntry); // Collapse "Default 
Paragraph Style"
82 }
83 
84 InspectorTextPanel::~InspectorTextPanel() { disposeOnce(); }
85 

** CID 1465256:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/8/bits/list.tcc: 67 in 
std::__cxx11::_List_base>::_M_clear()()



*** CID 

New Defects reported by Coverity Scan for LibreOffice

2020-07-09 Thread scan-admin
Hi,

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

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


** CID 1465241:  Error handling issues  (CHECKED_RETURN)
/svx/source/form/datanavi.cxx: 791 in svxform::XFormsPage::EditEntry(const 
com::sun::star::uno::Reference &)()



*** CID 1465241:  Error handling issues  (CHECKED_RETURN)
/svx/source/form/datanavi.cxx: 791 in svxform::XFormsPage::EditEntry(const 
com::sun::star::uno::Reference &)()
785 
786 if ( DGTSubmission == m_eGroup )
787 {
788 try
789 {
790 std::unique_ptr 
xEntry(m_xItemList->make_iterator());
>>> CID 1465241:  Error handling issues  (CHECKED_RETURN)
>>> Calling "get_selected" without checking return value (as is done 
>>> elsewhere 77 out of 94 times).
791 m_xItemList->get_selected(xEntry.get());
792 
793 // #i36262# may be called for submission entry *or* for
794 // submission children. If we don't have any children, 
we
795 // assume the latter case and use the parent
796 if (!m_xItemList->iter_has_child(*xEntry))

** CID 1465240:  Control flow issues  (DEADCODE)
/vcl/source/gdi/pdfwriter_impl.cxx: 595 in 
vclappendPdfTimeDate(rtl::OStringBuffer &, short, unsigned short, 
unsigned short, unsigned short, unsigned short, unsigned short, unsigned int)()



*** CID 1465240:  Control flow issues  (DEADCODE)
/vcl/source/gdi/pdfwriter_impl.cxx: 595 in 
vclappendPdfTimeDate(rtl::OStringBuffer &, short, unsigned short, 
unsigned short, unsigned short, unsigned short, unsigned short, unsigned int)()
589 }
590 else
591 {
592 if (tzDelta > 0 )
593 rBuffer.append("+");
594 else
>>> CID 1465240:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "rBuffer->append("-");".
595 rBuffer.append("-");
596 
597 rBuffer.append(char('0' + ((tzDelta / 36000) % 10)));
598 rBuffer.append(char('0' + ((tzDelta / 3600) % 10)));
599 rBuffer.append("'");
600 rBuffer.append(char('0' + ((tzDelta / 600) % 6)));

** CID 1465239:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1465239:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/filter/ipdf/pdfdocument.cxx: 360 in 
vcl::filter::PDFDocument::WriteAppearanceObject(tools::Rectangle &)()
354 aEditBuffer.WriteCharPtr("<>> CID 1465239:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pPage" to "copyPageResources", which dereferences 
>>> it.
360 aCopier.copyPageResources(pPage, aBuffer);
361 aEditBuffer.WriteOString(aBuffer.makeStringAndClear());
362 }
363 
364 aEditBuffer.WriteCharPtr("/BBox[0 0 ");
365 
aEditBuffer.WriteOString(OString::number(rSignatureRectangle.getWidth()));

** CID 1465238:  Uninitialized members  (UNINIT_CTOR)
/chart2/source/view/charttypes/VSeriesPlotter.cxx: 155 in 
chart::VSeriesPlotter::VSeriesPlotter(const 
com::sun::star::uno::Reference &, int, 
bool)()



*** CID 1465238:  Uninitialized members  (UNINIT_CTOR)
/chart2/source/view/charttypes/VSeriesPlotter.cxx: 155 in 
chart::VSeriesPlotter::VSeriesPlotter(const 
com::sun::star::uno::Reference &, int, 
bool)()
149 , m_aNullDate(30,12,1899)
150 , m_xColorScheme()
151 , m_pExplicitCategoriesProvider(nullptr)
152 , m_bPointsWereSkipped(false)
153 {
154 SAL_WARN_IF(!m_xChartTypeModel.is(),"chart2","no XChartType 
available in view, fallback to default values may be wrong");
>>> CID 1465238:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_bPieLabelsAllowToMove" is not initialized in 
>>> this constructor nor in any functions that it calls.
155 }
156 
157 VSeriesPlotter::~VSeriesPlotter()
158 {
159 //delete all data series help objects:
160 for (std::vector  & rGroupVector : m_aZSlots)

** CID 1465237:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1465237:  Null pointer dereferences  (FORWARD_NULL)

New Defects reported by Coverity Scan for LibreOffice

2020-06-26 Thread scan-admin
Hi,

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

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


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


** CID 1464975:(RESOURCE_LEAK)
/sd/source/filter/sdpptwrp.cxx: 347 in SdPPTFilter::Export()()
/sd/source/filter/sdpptwrp.cxx: 349 in SdPPTFilter::Export()()
/sd/source/filter/sdpptwrp.cxx: 324 in SdPPTFilter::Export()()



*** CID 1464975:(RESOURCE_LEAK)
/sd/source/filter/sdpptwrp.cxx: 347 in SdPPTFilter::Export()()
341 Sequence aStreamContent;
342 aStreamData.Value >>= aStreamContent;
343 size_t nBytesWritten = 
pStream->WriteBytes(aStreamContent.getArray(), aStreamContent.getLength());
344 if (nBytesWritten != 
static_cast(aStreamContent.getLength()))
345 {
346 bRet = false;
>>> CID 1464975:(RESOURCE_LEAK)
>>> Variable "pStorage" going out of scope leaks the storage it points to.
347 break;
348 }
349 }
350 xEncryptedRootStrg->Commit();
351 
352 // Restore encryption data
/sd/source/filter/sdpptwrp.cxx: 349 in SdPPTFilter::Export()()
343 size_t nBytesWritten = 
pStream->WriteBytes(aStreamContent.getArray(), aStreamContent.getLength());
344 if (nBytesWritten != 
static_cast(aStreamContent.getLength()))
345 {
346 bRet = false;
347 break;
348 }
>>> CID 1464975:(RESOURCE_LEAK)
>>> Variable "pStorage" going out of scope leaks the storage it points to.
349 }
350 xEncryptedRootStrg->Commit();
351 
352 // Restore encryption data
353 
mrMedium.GetItemSet()->Put(SfxUnoAnyItem(SID_ENCRYPTIONDATA, 
makeAny(aEncryptionData)));
354 }
/sd/source/filter/sdpptwrp.cxx: 324 in SdPPTFilter::Export()()
318 if (idx < 0)
319 {
320 sFileName = sPathElem;
321 }
322 else
323 {
>>> CID 1464975:(RESOURCE_LEAK)
>>> Overwriting "pStorage" in "pStorage = 
>>> pStorage->OpenSotStorage(sPathElem, StreamMode::STD_READWRITE, true)" leaks 
>>> the storage that "pStorage" points to.
324 pStorage = 
pStorage->OpenSotStorage(sPathElem);
325 }
326 }
327 } while (pStorage && idx >= 0);
328 
329 if (!pStorage)

** CID 1464974:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1464974:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/unocore/unosett.cxx: 1774 in 
SwXNumberingRules::SetPropertiesToNumFormat(SwNumFormat &, rtl::OUString &, 
rtl::OUString *, rtl::OUString *, rtl::OUString *, SwDoc *, const 
com::sun::star::uno::Sequence &)()
1768 bWrongArg = true;
1769 }
1770 else if (rProp.Name == UNO_NAME_BULLET_FONT_NAME)
1771 {
1772 OUString sBulletFontName;
1773 rProp.Value >>= sBulletFontName;
>>> CID 1464974:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pDoc" to "GetDocShell", which dereferences it.
1774 SwDocShell* pLclDocShell = pDoc->GetDocShell();
1775 if( !sBulletFontName.isEmpty() && pLclDocShell )
1776 {
1777 const SvxFontListItem* pFontListItem =
1778 static_cast(pLclDocShell
1779 ->GetItem( 
SID_ATTR_CHAR_FONTLIST ));

** CID 1464973:(RESOURCE_LEAK)
/sc/source/filter/excel/excel.cxx: 363 in lcl_ExportExcelBiff(SfxMedium &, 
ScDocument *, SvStream *, bool, unsigned short)()
/sc/source/filter/excel/excel.cxx: 388 in lcl_ExportExcelBiff(SfxMedium &, 
ScDocument *, SvStream *, bool, unsigned short)()
/sc/source/filter/excel/excel.cxx: 386 in lcl_ExportExcelBiff(SfxMedium &, 
ScDocument *, SvStream *, bool, unsigned short)()



*** CID 1464973:(RESOURCE_LEAK)
/sc/source/filter/excel/excel.cxx: 

New Defects reported by Coverity Scan for LibreOffice

2020-04-25 Thread scan-admin
Hi,

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

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


** CID 1401342:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/8/bits/shared_ptr_base.h: 550 in 
std::_Sp_counted_ptr_inplace, 
(__gnu_cxx::_Lock_policy)2>::_M_dispose()()



*** CID 1401342:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/8/bits/shared_ptr_base.h: 550 in 
std::_Sp_counted_ptr_inplace, 
(__gnu_cxx::_Lock_policy)2>::_M_dispose()()
544   std::forward<_Args>(__args)...); // might throw
545 }
546 
547   ~_Sp_counted_ptr_inplace() noexcept { }
548 
549   virtual void
>>> CID 1401342:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the throw list "noexcept" doesn't allow it to be thrown. This will 
>>> cause a call to unexpected() which usually calls terminate().
550   _M_dispose() noexcept
551   {
552 allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr());
553   }
554 
555   // Override because the allocator needs to know the dynamic type



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/ls/click?upn=nJaKvJSIH-2FPAfmty-2BK5tYpPklAc1eEA-2F1zfUjH6teExViPHTTReBArhCRZ3BE4kCjKjDqn2Dq3ZyEbAvAs31gRpU3vMPHDnoSx68vDAWjNU-3DVJm7_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJi74TlrHejpiGWedepdxSxHN-2FcBOjtVAU6nFpMwgep7XzJy9zQzQ6T4co82Vo12CucD8rR3UxhBsOoipyeZjnantAe4IEYmXmCHFfCXZSrA5oWke5YA3gjtr9TPOV73nXXEh9tuEFLvkYsjimSb4O0qCP0vldo3ArPXVMNXL2BAQQRsUXdbJ-2ByWFViaSH8049t

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-04-23 Thread scan-admin
Hi,

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

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


** CID 1462476:  Uninitialized members  (UNINIT_CTOR)
/svx/source/tbxctrls/tbcontrl.cxx: 2923 in 
::SvxFontNameToolBoxControl::SvxFontNameToolBoxControl()()



*** CID 1462476:  Uninitialized members  (UNINIT_CTOR)
/svx/source/tbxctrls/tbcontrl.cxx: 2923 in 
::SvxFontNameToolBoxControl::SvxFontNameToolBoxControl()()
2917 
2918 return pBox.get();
2919 }
2920 
2921 SvxFontNameToolBoxControl::SvxFontNameToolBoxControl()
2922 {
>>> CID 1462476:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_pBox" is not initialized in this constructor 
>>> nor in any functions that it calls.
2923 }
2924 
2925 void SvxFontNameBox_Base::statusChanged_Impl( const 
css::frame::FeatureStateEvent& rEvent )
2926 {
2927 if ( !rEvent.IsEnabled )
2928 {

** CID 1455212:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/8/bits/shared_ptr_base.h: 550 in 
std::_Sp_counted_ptr_inplace, 
(__gnu_cxx::_Lock_policy)2>::_M_dispose()()



*** CID 1455212:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/8/bits/shared_ptr_base.h: 550 in 
std::_Sp_counted_ptr_inplace, 
(__gnu_cxx::_Lock_policy)2>::_M_dispose()()
544   std::forward<_Args>(__args)...); // might throw
545 }
546 
547   ~_Sp_counted_ptr_inplace() noexcept { }
548 
549   virtual void
>>> CID 1455212:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::DeploymentException" is 
>>> thrown but the throw list "noexcept" doesn't allow it to be thrown. This 
>>> will cause a call to unexpected() which usually calls terminate().
550   _M_dispose() noexcept
551   {
552 allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr());
553   }
554 
555   // Override because the allocator needs to know the dynamic type



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/ls/click?upn=nJaKvJSIH-2FPAfmty-2BK5tYpPklAc1eEA-2F1zfUjH6teExViPHTTReBArhCRZ3BE4kCjKjDqn2Dq3ZyEbAvAs31gRpU3vMPHDnoSx68vDAWjNU-3DYvcL_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiibaz9x5mv90jSOKdvPU0GvjPNXGitrPBY4fiT34oI-2BfMxX7Q6Q6-2FrpSviN1XsbC2ehmqhHtOYAkDr9q1juVLuElyy8RfY-2FiLCX-2BtkxXVDPDptxidVv5Y8-2BFaVyGxYcYZDPhZwZPto6MwR9a9mrlfNzQ0ffkJfCmsmEZI-2Fjk5RbEhIDnAAEDmdzKDkiiqjuZ5

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-04-19 Thread scan-admin
Hi,

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

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


** CID 1462318:  Memory - illegal accesses  (USE_AFTER_FREE)



*** CID 1462318:  Memory - illegal accesses  (USE_AFTER_FREE)
/bridges/source/jni_uno/jni_java2uno.cxx: 218 in 
jni_uno::Bridge::call_uno(const jni_uno::JNI_context &, _uno_Interface *, 
_typelib_TypeDescription *, _typelib_TypeDescriptionReference *, int, const 
_typelib_MethodParameter *, _jobjectArray *) const()
212 {
213 JLocalAutoRef jo_arg(
214 jni, jni->GetObjectArrayElement( jo_args, nPos ) );
215 jni.ensure_no_exception();
216 jvalue java_arg;
217 java_arg.l = jo_arg.get();
>>> CID 1462318:  Memory - illegal accesses  (USE_AFTER_FREE)
>>> Calling "map_to_uno" dereferences freed pointer "type".
218 map_to_uno(
219 jni, uno_args[ nPos ], java_arg, type, nullptr,
220 false /* no assign */, param.bOut,
221 true /* special wrapped integral types */ );
222 }
223 catch (...)

** CID 1462317:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1462317:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/crsr/crsrsh.cxx: 1235 in 
SwCursorShell::GetPageNumSeqNonEmpty()()
1229 // page number: first visible page or the one at the cursor
1230 const SwContentFrame* pCFrame = GetCurrFrame(/*bCalcFrame*/true);
1231 const SwPageFrame* pPg = nullptr;
1232 
1233 if (!pCFrame )
1234 {
>>> CID 1462317:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pCFrame" to "FindPageFrame", which dereferences 
>>> it.
1235 pPg = pCFrame->FindPageFrame();
1236 if( !pPg )
1237 {
1238 pPg = Imp()->GetFirstVisPage(GetOut());
1239 while (pPg && pPg->IsEmptyPage())
1240 pPg = static_cast(pPg->GetNext());

** CID 1462316:(USE_AFTER_FREE)
/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx: 491 in 
Proxy::dispatch(_typelib_TypeDescriptionReference *, _typelib_MethodParameter 
*, int, const _typelib_TypeDescription *, void *, void **, _uno_Any **)()



*** CID 1462316:(USE_AFTER_FREE)
/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx: 457 in 
Proxy::dispatch(_typelib_TypeDescriptionReference *, _typelib_MethodParameter 
*, int, const _typelib_TypeDescription *, void *, void **, _uno_Any **)()
451 }
452 uno_Environment_invoke(m_to.get(), 
s_type_destructData_v, args[nPos], param.pTypeRef, 0);
453 }
454 }
455 if (ret != pReturn)
456 {
>>> CID 1462316:(USE_AFTER_FREE)
>>> Calling "uno_type_copyAndConvertData" dereferences freed pointer 
>>> "pReturnTypeRef".
457 uno_type_copyAndConvertData(pReturn,
458 ret,
459 pReturnTypeRef,
460 m_to_from.get());
461 
462 uno_Environment_invoke(m_to.get(), s_type_destructData_v, 
ret, pReturnTypeRef, 0);
/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx: 491 in 
Proxy::dispatch(_typelib_TypeDescriptionReference *, _typelib_MethodParameter 
*, int, const _typelib_TypeDescription *, void *, void **, _uno_Any **)()
485 
486 // FIXME: need to destruct in m_to
487 uno_any_destruct(exc, nullptr);
488 }
489 
490 if (m_probeFun)
>>> CID 1462316:(USE_AFTER_FREE)
>>> Passing freed pointer "pReturnTypeRef" as an argument to 
>>> "*this->m_probeFun".
491 m_probeFun(false,
492this,
493m_pProbeContext,
494pReturnTypeRef,
495pParams,
496nParams,

** CID 1462315:  Integer handling issues  (DIVIDE_BY_ZERO)
/vcl/unx/gtk3/gtk3gtkinst.cxx: 12791 in 
::GtkInstanceComboBox::get_popup_height()()



*** CID 1462315:  Integer handling issues  (DIVIDE_BY_ZERO)
/vcl/unx/gtk3/gtk3gtkinst.cxx: 12791 in 

New Defects reported by Coverity Scan for LibreOffice

2020-04-16 Thread scan-admin
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 1462267:  Program hangs  (INFINITE_LOOP)
/soltools/cpp/_eval.c: 730 in tokval()



*** CID 1462267:  Program hangs  (INFINITE_LOOP)
/soltools/cpp/_eval.c: 730 in tokval()
724 }
725 else
726 if (*p == 'x')
727 {
728 p += 1;
729 i = digit(*p);
>>> CID 1462267:  Program hangs  (INFINITE_LOOP)
>>> Top of the loop.
730 while (i >= 0 && i <= 15)
731 {
732 p += 1;
733 n <<= 4;
734 n += i;
735 }

** CID 1462266:  Control flow issues  (DEADCODE)
/sc/source/ui/view/dbfunc3.cxx: 150 in ScDBFunc::TestRemoveOutline(bool &, bool 
&)()



*** CID 1462266:  Control flow issues  (DEADCODE)
/sc/source/ui/view/dbfunc3.cxx: 150 in ScDBFunc::TestRemoveOutline(bool &, bool 
&)()
144 if ( !bRowMarked || bColMarked )// not when entire 
rows are marked
145 {
146 ScOutlineArray& rArray = pTable->GetColArray();
147 ScSubOutlineIterator aColIter(  );
148 while (bColFound)
149 {
>>> CID 1462266:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "pEntry = aColIter.GetNext();".
150 pEntry=aColIter.GetNext();
151 if (!pEntry)
152 break;
153 nStart = pEntry->GetStart();
154 nEnd   = pEntry->GetEnd();
155 if ( nStartCol<=static_cast(nEnd) && 
nEndCol>=static_cast(nStart) )

** CID 1462265:  Error handling issues  (UNCAUGHT_EXCEPT)
/vcl/source/gdi/impgraph.cxx: 353 in ImpSwapFile::~ImpSwapFile()()



*** CID 1462265:  Error handling issues  (UNCAUGHT_EXCEPT)
/vcl/source/gdi/impgraph.cxx: 353 in ImpSwapFile::~ImpSwapFile()()
347 maMetaFile.Clear();
348 mpAnimation.reset();
349 mpGfxLink.reset();
350 maVectorGraphicData.reset();
351 }
352 
>>> CID 1462265:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::DeploymentException" is 
>>> thrown but the throw list "noexcept" doesn't allow it to be thrown. This 
>>> will cause a call to unexpected() which usually calls terminate().
353 ImpSwapFile::~ImpSwapFile()
354 {
355 
utl::UCBContentHelper::Kill(aSwapURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
356 }
357 
358 void ImpGraphic::ImplSetPrepared(bool bAnimated, const Size* pSizeHint)

** CID 1462264:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/gdi/gfxlink.cxx: 50 in GfxLink::GfxLink(std::unique_ptr>, unsigned int, GfxLinkType)()



*** CID 1462264:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/gdi/gfxlink.cxx: 50 in GfxLink::GfxLink(std::unique_ptr>, unsigned int, GfxLinkType)()
44 , mnSwapInDataSize(nSize)
45 , mbPrefMapModeValid(false)
46 , mbPrefSizeValid(false)
47 {
48 SAL_WARN_IF(mpSwapInData == nullptr || mnSwapInDataSize <= 0, "vcl",
49 "GfxLink::GfxLink(): empty/NULL buffer given");
>>> CID 1462264:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "maHash" is not initialized in this constructor 
>>> nor in any functions that it calls.
50 }
51 
52 size_t GfxLink::GetHash() const
53 {
54 if (!maHash)
55 {

** CID 708596:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/gdi/gfxlink.cxx: 36 in GfxLink::GfxLink()()



*** CID 708596:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/gdi/gfxlink.cxx: 36 in GfxLink::GfxLink()()
30 : meType(GfxLinkType::NONE)
31 , mnUserId(0)
32 , mnSwapInDataSize(0)
33 , mbPrefMapModeValid(false)
34 , mbPrefSizeValid(false)
35 {
>>> CID 708596:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "maHash" is not initialized in this constructor 
>>> nor in any functions that it calls.
36 }
37 
38 
39 
40 

New Defects reported by Coverity Scan for LibreOffice

2020-04-08 Thread scan-admin
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 1461388:  Error handling issues  (CHECKED_RETURN)
/sd/source/ui/animations/CustomAnimationList.cxx: 482 in 
sd::CustomAnimationList::DragBeginHdl(bool &)()



*** CID 1461388:  Error handling issues  (CHECKED_RETURN)
/sd/source/ui/animations/CustomAnimationList.cxx: 482 in 
sd::CustomAnimationList::DragBeginHdl(bool &)()
476 
mDndEffectsSelected.emplace_back(mxTreeView->make_iterator());
477 return false;
478 });
479 
480 // Note: pEntry is the effect with focus (if multiple effects are 
selected)
481 mxDndEffectDragging = mxTreeView->make_iterator();
>>> CID 1461388:  Error handling issues  (CHECKED_RETURN)
>>> Calling "get_cursor" without checking return value (as is done 
>>> elsewhere 37 out of 41 times).
482 mxTreeView->get_cursor(mxDndEffectDragging.get());
483 mxDndEffectInsertBefore = 
mxTreeView->make_iterator(mxDndEffectDragging.get());
484 
485 // Allow normal processing.
486 return false;
487 }

** CID 1461387:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/unoobj/textuno.cxx: 900 in ScCellTextObj::~ScCellTextObj()()



*** CID 1461387:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/unoobj/textuno.cxx: 900 in ScCellTextObj::~ScCellTextObj()()
894 ScCellTextObj::ScCellTextObj(ScDocShell* pDocSh, const ScAddress& rP) :
895 ScCellTextData( pDocSh, rP ),
896 SvxUnoText( GetOriginalSource(), ScCellObj::GetEditPropertySet(), 
uno::Reference() )
897 {
898 }
899 
>>> CID 1461387:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the throw list "throw()" doesn't allow it to be thrown. This will cause 
>>> a call to unexpected() which usually calls terminate().
900 ScCellTextObj::~ScCellTextObj() throw()
901 {
902 }
903 

** CID 1461386:  Error handling issues  (CHECKED_RETURN)
/sd/source/ui/animations/CustomAnimationList.cxx: 1103 in 
_ZZNK2sd19CustomAnimationList12getSelectionB5cxx11EvENKUlRN4weld8TreeIterEE_clES3_()



*** CID 1461386:  Error handling issues  (CHECKED_RETURN)
/sd/source/ui/animations/CustomAnimationList.cxx: 1103 in 
_ZZNK2sd19CustomAnimationList12getSelectionB5cxx11EvENKUlRN4weld8TreeIterEE_clES3_()
1097 
1098 // if the selected effect is not expanded and has children
1099 // we say that the children are automatically selected
1100 if (!mxTreeView->get_row_expanded(rEntry) && 
mxTreeView->iter_has_child(rEntry))
1101 {
1102 std::unique_ptr xChild = 
mxTreeView->make_iterator();
>>> CID 1461386:  Error handling issues  (CHECKED_RETURN)
>>> Calling "iter_children" without checking return value (as is done 
>>> elsewhere 37 out of 39 times).
1103 mxTreeView->iter_children(*xChild);
1104 
1105 do
1106 {
1107 if (!mxTreeView->is_selected(*xChild))
1108 {

** CID 1461385:  Error handling issues  (CHECKED_RETURN)
/vcl/source/bitmap/bitmap.cxx: 329 in Bitmap::ImplMakeUnique()()



*** CID 1461385:  Error handling issues  (CHECKED_RETURN)
/vcl/source/bitmap/bitmap.cxx: 329 in Bitmap::ImplMakeUnique()()
323 void Bitmap::ImplMakeUnique()
324 {
325 if (mxSalBmp && mxSalBmp.use_count() > 1)
326 {
327 std::shared_ptr xOldImpBmp = mxSalBmp;
328 mxSalBmp = ImplGetSVData()->mpDefInst->CreateSalBitmap();
>>> CID 1461385:  Error handling issues  (CHECKED_RETURN)
>>> Calling "Create" without checking return value (as is done elsewhere 4 
>>> out of 5 times).
329 mxSalBmp->Create(*xOldImpBmp);
330 }
331 }
332 
333 void Bitmap::ReassignWithSize(const Bitmap& rBitmap)
334 {



To view the defects in Coverity Scan visit, 

New Defects reported by Coverity Scan for LibreOffice

2020-04-01 Thread scan-admin
Hi,

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

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


** CID 1461094:  Error handling issues  (CHECKED_RETURN)
/svx/source/svdraw/svdoedge.cxx: 2233 in SdrEdgeObj::ImpFindConnector(const 
Point &, const SdrPageView &, SdrObjConnection &, const SdrEdgeObj*, 
OutputDevice *)()



*** CID 1461094:  Error handling issues  (CHECKED_RETURN)
/svx/source/svdraw/svdoedge.cxx: 2233 in SdrEdgeObj::ImpFindConnector(const 
Point &, const SdrPageView &, SdrObjConnection &, const SdrEdgeObj*, 
OutputDevice *)()
2227 if (bFnd) {
2228 tools::Rectangle aMouseRect2(rPt,rPt);
2229 aMouseRect.AdjustLeft( -nBoundHitTol );
2230 aMouseRect.AdjustTop( -nBoundHitTol );
2231 aMouseRect.AdjustRight(nBoundHitTol );
2232 aMouseRect.AdjustBottom(nBoundHitTol );
>>> CID 1461094:  Error handling issues  (CHECKED_RETURN)
>>> Calling "IsOver" without checking return value (as is done elsewhere 44 
>>> out of 50 times).
2233 aObjBound.IsOver(aMouseRect2);
2234 }
2235 
2236 }
2237 }
2238 }



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/ls/click?upn=nJaKvJSIH-2FPAfmty-2BK5tYpPklAc1eEA-2F1zfUjH6teExViPHTTReBArhCRZ3BE4kCjKjDqn2Dq3ZyEbAvAs31gRpU3vMPHDnoSx68vDAWjNU-3Dnm8T_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiIth8afhyuyTcbd8891FfvN9T94E-2FZCYerIfyIlLQ-2FWrNYtCd3bvK3s5PABB0sERPY-2FsJaXRb7g2FCZlX7Di3sFwgPLJkpttl8KE2RxbPZ9L-2Bx6OOejBz0jJ2MKzbSnupiIvwCY5MnrI11MF6qRsv7FMmYXO62LEOL0IHdsuv3TyQRQAXzRdCAao7JQ27tX4B

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-03-27 Thread scan-admin
Hi,

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

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


** CID 1460978:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 2372 in 
SwContentTree::HasContentChanged()()



*** CID 1460978:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 2372 in 
SwContentTree::HasContentChanged()()
2366 {
2367 bRemoveChildren = true;
2368 }
2369 else
2370 {
2371 std::unique_ptr 
xChild(m_xTreeView->make_iterator(xEntry.get()));
>>> CID 1460978:  Error handling issues  (CHECKED_RETURN)
>>> Calling "iter_children" without checking return value (as is done 
>>> elsewhere 36 out of 40 times).
2372 m_xTreeView->iter_children(*xChild);
2373 for (size_t j = 0; j < nChildCount; ++j)
2374 {
2375 const SwContent* pCnt = 
pArrType->GetMember(j);
2376 OUString 
sSubId(OUString::number(reinterpret_cast(pCnt)));
2377 m_xTreeView->set_id(*xChild, sSubId);

** CID 1460977:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/dlg/indexdialog.cxx: 360 in 
dbaui::DbaIndexDialog::OnRenameIndex()()



*** CID 1460977:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/dlg/indexdialog.cxx: 360 in 
dbaui::DbaIndexDialog::OnRenameIndex()()
354 
355 void DbaIndexDialog::OnRenameIndex()
356 {
357 // the selected index
358 std::unique_ptr 
xSelected(m_xIndexList->make_iterator());
359 // the selected index
>>> CID 1460977:  Error handling issues  (CHECKED_RETURN)
>>> Calling "get_selected" without checking return value (as is done 
>>> elsewhere 64 out of 80 times).
360 m_xIndexList->get_selected(xSelected.get());
361 
362 // save the changes made 'til here
363 // Upon leaving the edit mode, the control will be 
re-initialized with the
364 // settings from the current entry
365 implSaveModified(false);

** CID 1460976:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 1411 in SwContentTree::remove(const 
weld::TreeIter &)()



*** CID 1460976:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 1411 in SwContentTree::remove(const 
weld::TreeIter &)()
1405 
1406 void SwContentTree::remove(const weld::TreeIter& rIter)
1407 {
1408 if (m_xTreeView->iter_has_child(rIter))
1409 {
1410 std::unique_ptr xChild = 
m_xTreeView->make_iterator();
>>> CID 1460976:  Error handling issues  (CHECKED_RETURN)
>>> Calling "iter_children" without checking return value (as is done 
>>> elsewhere 36 out of 40 times).
1411 m_xTreeView->iter_children(*xChild);
1412 remove(*xChild);
1413 }
1414 m_xTreeView->remove(rIter);
1415 --m_nEntryCount;
1416 }

** CID 1460975:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/dlg/indexdialog.cxx: 384 in 
dbaui::DbaIndexDialog::OnResetIndex()()



*** CID 1460975:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/dlg/indexdialog.cxx: 384 in 
dbaui::DbaIndexDialog::OnResetIndex()()
378 
379 void DbaIndexDialog::OnResetIndex()
380 {
381 // the selected index
382 std::unique_ptr 
xSelected(m_xIndexList->make_iterator());
383 // the selected index
>>> CID 1460975:  Error handling issues  (CHECKED_RETURN)
>>> Calling "get_selected" without checking return value (as is done 
>>> elsewhere 64 out of 80 times).
384 m_xIndexList->get_selected(xSelected.get());
385 OSL_ENSURE(xSelected, "DbaIndexDialog::OnResetIndex: invalid 
call!");
386 
387 Indexes::iterator aResetPos = m_xIndexes->begin() + 
m_xIndexList->get_id(*xSelected).toUInt32();
388 
389 if (aResetPos->isNew())

** CID 1460974:  Error handling issues  (CHECKED_RETURN)
/sw/source/ui/misc/glossary.cxx: 509 in SwGlossaryDlg::MenuHdl(const 
rtl::OString &)()


New Defects reported by Coverity Scan for LibreOffice

2020-03-14 Thread scan-admin
Hi,

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

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


** CID 1460667:  Incorrect expression  (PW.ASSIGN_WHERE_COMPARE_MEANT)
/writerfilter/source/dmapper/DomainMapperTableManager.cxx: 722 in ()



*** CID 1460667:  Incorrect expression  (PW.ASSIGN_WHERE_COMPARE_MEANT)
/writerfilter/source/dmapper/DomainMapperTableManager.cxx: 722 in ()
716 #endif
717 insertRowProps(pPropMap);
718 }
719 else if ( !pCellWidths->empty() &&
720( m_nLayoutType == 
NS_ooxml::LN_Value_doc_ST_TblLayout_fixed
721  || pCellWidths->size() == ( nGrids + m_nGridAfter )
>>> CID 1460667:  Incorrect expression  (PW.ASSIGN_WHERE_COMPARE_MEANT)
>>> use of "=" where "==" may have been intended
722  || ((bIsIncompleteGrid = true) && nGrids + 
m_nGridAfter > pTableGrid->size() && pCellWidths->size() > 0) )
723  )
724 {
725 // If we're here, then the number of cells does not equal to 
the amount
726 // defined by the grid, even after taking care of
727 // gridSpan/gridBefore/gridAfter. Handle this by ignoring the 
grid and

** CID 1460666:  Error handling issues  (CHECKED_RETURN)
/sc/source/ui/view/cellsh1.cxx: 1509 in ScCellShell::ExecuteEdit(SfxRequest &)()



*** CID 1460666:  Error handling issues  (CHECKED_RETURN)
/sc/source/ui/view/cellsh1.cxx: 1509 in ScCellShell::ExecuteEdit(SfxRequest &)()
1503 const uno::Reference& 
xTransferable
1504 = aDataHelper.GetTransferable();
1505 SotClipboardFormatId format = SotClipboardFormatId::STRING;
1506 if (xTransferable.is() && HasClipboardFormat(format))
1507 {
1508 auto pStrBuffer = std::make_shared();
>>> CID 1460666:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetString" without checking return value (as is done elsewhere 
>>> 26 out of 28 times).
1509 aDataHelper.GetString(format, *pStrBuffer);
1510 auto pStrm = 
std::make_shared(*pStrBuffer);
1511 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
1512 VclPtr 
pDlg(pFact->CreateScImportAsciiDlg(
1513 pWin ? pWin->GetFrameWeld() : nullptr, OUString(), 
pStrm.get(), SC_PASTETEXT));
1514 ScRange aRange;

** CID 1460665:  Incorrect expression  (DIVIDE_BY_ZERO)
/sc/source/ui/dataprovider/datatransformation.cxx: 345 in 
sc::AggregateFunction::Transform(ScDocument &) const()



*** CID 1460665:  Incorrect expression  (DIVIDE_BY_ZERO)
/sc/source/ui/dataprovider/datatransformation.cxx: 345 in 
sc::AggregateFunction::Transform(ScDocument &) const()
339 {
340 double nVal = rDoc.GetValue(rCol, nRow, 0);
341 nSum += nVal;
342 }
343 }
344 
>>> CID 1460665:  Incorrect expression  (DIVIDE_BY_ZERO)
>>> In expression "nSum / (nEndRow + 1)", division by expression "nEndRow + 
>>> 1" which may be zero has undefined behavior.
345 double nAvg = nSum / (nEndRow + 1);
346 rDoc.SetValue(rCol, nEndRow + 1, 0, nAvg);
347 }
348 break;
349 case AGGREGATE_FUNCTION::MIN:
350 {



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/ls/click?upn=nJaKvJSIH-2FPAfmty-2BK5tYpPklAc1eEA-2F1zfUjH6teExViPHTTReBArhCRZ3BE4kCjKjDqn2Dq3ZyEbAvAs31gRpU3vMPHDnoSx68vDAWjNU-3DNJ59_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiyHO9KzrrSCXxrycERtF8U2RqL-2Br5tk723WtVFpU28RQluDBP7TLaLnET9hsKWjq776U8e-2BhJQrsIIw3DJo-2FELyi4-2BIS3B3d9Qk26QT9wfNJTt1vfq-2BYVe2bDqBfUdPrxuS8JSSVoTlOI7LGznSz9N7u5FsQpQCTpmNqGnGBRiy7DdLKBR3pBqyJ7FLnPo058

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-03-04 Thread scan-admin
Hi,

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

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


** CID 1460477:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx: 401 in 
drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(const 
drawinglayer::primitive2d::BasePrimitive2D &)()



*** CID 1460477:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx: 401 in 
drawinglayer::processor2d::VclPixelProcessor2D::processBasePrimitive2D(const 
drawinglayer::primitive2d::BasePrimitive2D &)()
395 
396 // calculate blurry effect
397 BitmapFilterStackBlur glowFilter(nRadius);
398 BitmapFilter::Filter(bitmap, glowFilter);
399 // back to old OutDev
400 mpOutputDevice = pLastOutputDevice;
>>> CID 1460477:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
>>> Dividing integer expressions "5" and "2", and then converting the 
>>> integer quotient to type "double". Any remainder, or fractional part of the 
>>> quotient, is ignored.
401 
mpOutputDevice->DrawBitmapEx(Point(aRange.getMinX()-nRadius/2, 
aRange.getMinY()-nRadius/2), BitmapEx(bitmap.GetBitmap(), mask));
402 
403 // paint result
404 //aBufferDevice.paint();
405 }
406 else

** CID 1460475:  Integer handling issues  (BAD_SHIFT)
/workdir/UnpackedTarball/dtoa/src/dtoa.c: 2305 in d2b(U *, int *, int *)()



*** CID 1460475:  Integer handling issues  (BAD_SHIFT)
/workdir/UnpackedTarball/dtoa/src/dtoa.c: 2305 in d2b(U *, int *, int *)()
2299 #endif
2300 #ifdef Pack_32
2301if ((y = d1)) {
2302if ((k = lo0bits())) {
2303x[0] = y | z << (32 - k);
2304assert(k < 32); /* 
https://u2389337.ct.sendgrid.net/ls/click?upn=nJaKvJSIH-2FPAfmty-2BK5tYpTgcwIVzti0PGs7l-2FQySlHBnRzAskLVuE7s2IZEr9EXymC5_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJirnfQWQqR0QvlLY-2Brze91W6nQU7e8fF9fAS3ivvYn4nRSY4T-2FET5YduNFBFUflaM9VAg6nBaG-2F1e65KZMShtjGMwmIudBTh4xRK6-2BwqhKc9HJtMbxl0REMGeikasT2NF-2Fe4GoXVggAhJpjh7SB9wyVZrjEuk1YuHCWnOQmOfHqVHPDk-2FSr62SMNUSiy8wAjqF
 */
>>> CID 1460475:  Integer handling issues  (BAD_SHIFT)
>>> In expression "z >>= k", right shifting by more than 31 bits has 
>>> undefined behavior.  The shift amount, "k", is 32.
2305z >>= k;
2306}
2307else
2308x[0] = y;
2309 #ifndef Sudden_Underflow
2310i =



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/ls/click?upn=nJaKvJSIH-2FPAfmty-2BK5tYpPklAc1eEA-2F1zfUjH6teExViPHTTReBArhCRZ3BE4kCjKjDqn2Dq3ZyEbAvAs31gRpU3vMPHDnoSx68vDAWjNU-3Dc9Xh_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJirnfQWQqR0QvlLY-2Brze91W2IdFJqdH71tMlTMbDCxy-2FeihJtmvPGLNx9ANI1-2FfCROmbM3uJkoM7QDoY-2F5KjqP9gkxfvgVodE7dCCkRoGp1ky3-2BAZIbZBLUyEuSwCDZ7zkY0bvZxl-2FP0HyCVi2A8ecQjp4C9OBBtNUzYQtqIL9h8UJ4BZsF4Dl11XuHgb8c8gl

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-03-03 Thread scan-admin
Hi,

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

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


** CID 1460466:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/drawfunc/fuins2.cxx: 463 in 
FuInsertChart::FuInsertChart(ScTabViewShell &, vcl::Window *, ScDrawView *, 
SdrModel *, SfxRequest &)()



*** CID 1460466:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/drawfunc/fuins2.cxx: 463 in 
FuInsertChart::FuInsertChart(ScTabViewShell &, vcl::Window *, ScDrawView *, 
SdrModel *, SfxRequest &)()
457 const SfxItemSet* pReqArgs = rReq.GetArgs();
458 
459 if( ! rReq.IsAPI() )
460 rReq.Done();
461 
462 if (!SvtModuleOptions().IsChart())
>>> CID 1460466:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_pInsertedObject" is not initialized in this 
>>> constructor nor in any functions that it calls.
463 return;
464 
465 // BM/IHA --
466 
467 // get range
468 OUString aRangeString;



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/ls/click?upn=nJaKvJSIH-2FPAfmty-2BK5tYpPklAc1eEA-2F1zfUjH6teExViPHTTReBArhCRZ3BE4kCjKjDqn2Dq3ZyEbAvAs31gRpU3vMPHDnoSx68vDAWjNU-3Djfj5_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiXEh9UuCIwrYzlQWqnUiaTtGwWILRHsGhDgf-2BA86aJ8gKUIGtYTl3m9jHsqiI2Ji7q2v1yfV7SN73DbQqiiV3y6UEcXg7mS-2Fjy1KCo8fI4iYDbMtyslKy-2BCWSW-2B5yKuFfs0e9gAbXikMk5OXrRK1-2Fk8Myx8Xnxj38lMXStCxv4QX7HB-2B490anysmV8Po3WS8o

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-02-29 Thread scan-admin
Hi,

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

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


** CID 1459030:  Control flow issues  (MISSING_BREAK)
/workdir/UnpackedTarball/dtoa/src/dtoa.c: 3610 in strtod_nolocale()



*** CID 1459030:  Control flow issues  (MISSING_BREAK)
/workdir/UnpackedTarball/dtoa/src/dtoa.c: 3610 in strtod_nolocale()
3604if (!nd && !nz && !nz0) {
3605goto ret0;
3606}
3607s00 = s;
3608esign = 0;
3609switch(c = *++s) {
>>> CID 1459030:  Control flow issues  (MISSING_BREAK)
>>> The case for value "45" is not terminated by a 'break' statement.
3610case '-':
3611esign = 1;
3612case '+':
3613c = *++s;
3614}
3615if (c >= '0' && c <= '9') {

** CID 1459029:  Incorrect expression  (COPY_PASTE_ERROR)
/workdir/UnpackedTarball/dtoa/src/dtoa.c: 3350 in bigcomp()



*** CID 1459029:  Incorrect expression  (COPY_PASTE_ERROR)
/workdir/UnpackedTarball/dtoa/src/dtoa.c: 3350 in bigcomp()
3344dig = quorem(b,d);
3345}
3346for(j = bc->dp1; i++ < nd;) {
3347if ((dd = s0[j++] - '0' - dig))
3348goto ret;
3349if (!b->x[0] && b->wds == 1) {
>>> CID 1459029:  Incorrect expression  (COPY_PASTE_ERROR)
>>> "i" in "i < nd" looks like a copy-paste error.
3350if (i < nd)
3351dd = 1;
3352goto ret;
3353}
3354b = multadd(b, 10, 0 MTa);
3355dig = quorem(b,d);

** CID 1459028:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/dbui/dbtree.cxx: 419 in SwDBTreeList::ShowColumns(bool)()



*** CID 1459028:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/dbui/dbtree.cxx: 419 in SwDBTreeList::ShowColumns(bool)()
413 {
414 GotoRootLevelParent(*m_xTreeView, *xIter);
415 m_xTreeView->collapse_row(*xIter);
416 while (m_xTreeView->iter_has_child(*xIter))
417 {
418 m_xTreeView->copy_iterator(*xIter, *xChild);
>>> CID 1459028:  Error handling issues  (CHECKED_RETURN)
>>> Calling "iter_children" without checking return value (as is done 
>>> elsewhere 32 out of 40 times).
419 m_xTreeView->iter_children(*xChild);
420 m_xTreeView->remove(*xChild);
421 }
422 } while (m_xTreeView->iter_next(*xIter));
423 }
424 

** CID 1459027:  Error handling issues  (CHECKED_RETURN)
/xmlsecurity/source/dialogs/certificateviewer.cxx: 298 in 
CertificateViewerCertPathTP::ActivatePage()()



*** CID 1459027:  Error handling issues  (CHECKED_RETURN)
/xmlsecurity/source/dialogs/certificateviewer.cxx: 298 in 
CertificateViewerCertPathTP::ActivatePage()()
292 {
293 xParent = mxCertPathLB->make_iterator();
294 (void)mxCertPathLB->get_iter_first(*xParent);
295 }
296 else
297 {
>>> CID 1459027:  Error handling issues  (CHECKED_RETURN)
>>> Calling "iter_children" without checking return value (as is done 
>>> elsewhere 32 out of 40 times).
298 mxCertPathLB->iter_children(*xParent);
299 }
300 }
301 
302 if (xParent)
303 mxCertPathLB->select(*xParent);

** CID 1459026:  Error handling issues  (CHECKED_RETURN)
/fpicker/source/office/foldertree.cxx: 64 in FolderTree::FillTreeEntry(const 
weld::TreeIter &)()



*** CID 1459026:  Error handling issues  (CHECKED_RETURN)
/fpicker/source/office/foldertree.cxx: 64 in FolderTree::FillTreeEntry(const 
weld::TreeIter &)()
58 
59 if (m_sLastUpdatedDir != sURL)
60 {
61 while 

New Defects reported by Coverity Scan for LibreOffice

2020-02-14 Thread scan-admin
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.


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


** CID 1458437:  Incorrect expression  (USELESS_CALL)



*** CID 1458437:  Incorrect expression  (USELESS_CALL)
/vcl/source/fontsubset/sft.cxx: 2434 in 
vcl::GetTTGlobalFontInfo(vcl::TrueTypeFont *, vcl::TTGlobalFontInfo *)()
2428 if (table && table_size >= 10) {
2429 info->ascender  = XUnits(UPEm, GetInt16(table, 
HHEA_ascender_offset));
2430 info->descender = XUnits(UPEm, GetInt16(table, 
HHEA_descender_offset));
2431 info->linegap   = XUnits(UPEm, GetInt16(table, 
HHEA_lineGap_offset));
2432 }
2433 
>>> CID 1458437:  Incorrect expression  (USELESS_CALL)
>>> Calling "vcl::getTable(ttf, 8U)" is only useful for its return value, 
>>> which is ignored.
2434 getTable(ttf, O_vhea);
2435 }
2436 
2437 GlyphData *GetTTRawGlyphData(TrueTypeFont *ttf, sal_uInt32 glyphID)
2438 {
2439 const sal_uInt8* glyf = getTable(ttf, O_glyf);

** CID 1458436:  Error handling issues  (CHECKED_RETURN)
/vcl/source/window/builder.cxx: 3186 in 
VclBuilder::handleRow(xmlreader::XmlReader &, const rtl::OString &)()



*** CID 1458436:  Error handling issues  (CHECKED_RETURN)
/vcl/source/window/builder.cxx: 3186 in 
VclBuilder::handleRow(xmlreader::XmlReader &, const rtl::OString &)()
3180 {
3181 name = reader.getAttributeValue(false);
3182 sContext = OString(name.begin, name.length);
3183 }
3184 }
3185 
>>> CID 1458436:  Error handling issues  (CHECKED_RETURN)
>>> Calling "nextItem" without checking return value (as is done elsewhere 
>>> 25 out of 31 times).
3186 reader.nextItem(
3187 xmlreader::XmlReader::Text::Raw, , );
3188 
3189 OString sValue(name.begin, name.length);
3190 OUString sFinalValue;
3191 if (bTranslated)

** CID 1458435:  Error handling issues  (CHECKED_RETURN)
/vcl/source/window/builder.cxx: 3347 in 
VclBuilder::handleItems(xmlreader::XmlReader &) const()



*** CID 1458435:  Error handling issues  (CHECKED_RETURN)
/vcl/source/window/builder.cxx: 3347 in 
VclBuilder::handleItems(xmlreader::XmlReader &) const()
3341 {
3342 name = reader.getAttributeValue(false);
3343 sId = OString(name.begin, name.length);
3344 }
3345 }
3346 
>>> CID 1458435:  Error handling issues  (CHECKED_RETURN)
>>> Calling "nextItem" without checking return value (as is done elsewhere 
>>> 25 out of 31 times).
3347 reader.nextItem(
3348 xmlreader::XmlReader::Text::Raw, , );
3349 
3350 OString sValue(name.begin, name.length);
3351 OUString sFinalValue;
3352 if (bTranslated)

** CID 1458434:(TAINTED_SCALAR)
/filter/source/graphicfilter/ipict/ipict.cxx: 1129 in 
::PictReader::ReadPixMapEtc(BitmapEx &, bool, bool, tools::Rectangle 
*, tools::Rectangle *, bool, bool)()
/filter/source/graphicfilter/ipict/ipict.cxx: 1129 in 
::PictReader::ReadPixMapEtc(BitmapEx &, bool, bool, tools::Rectangle 
*, tools::Rectangle *, bool, bool)()



*** CID 1458434:(TAINTED_SCALAR)
/filter/source/graphicfilter/ipict/ipict.cxx: 1129 in 
::PictReader::ReadPixMapEtc(BitmapEx &, bool, bool, tools::Rectangle 
*, tools::Rectangle *, bool, bool)()
1123 aScanline[ i++ ] = nDat;
1124 }
1125 }
1126 sal_uInt8* pTmp = aScanline.data();
1127 if ( nCmpCount == 4 )
1128 pTmp += nWidth;
>>> CID 1458434:(TAINTED_SCALAR)
>>> Using tainted variable "nWidth" as a loop boundary.
1129 for (sal_uInt16 nx = 0; nx < nWidth; pTmp++)
1130 pBitmap->SetPixel(ny, nx++, Color(*pTmp, pTmp[ 
nWidth ], pTmp[ 2 * nWidth ]));
1131 nDataSize += nByteCount;
1132 pPict->Seek( nSrcBitsPos + nByteCount );
1133 }
1134 }
/filter/source/graphicfilter/ipict/ipict.cxx: 1129 in 

New Defects reported by Coverity Scan for LibreOffice

2020-02-08 Thread scan-admin
Hi,

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

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


** CID 1458168:(FORWARD_NULL)



*** CID 1458168:(FORWARD_NULL)
/vcl/unx/generic/gdi/gdiimpl.cxx: 1749 in 
X11SalGraphicsImpl::drawPolyLine(const basegfx::B2DHomMatrix &, const 
basegfx::B2DPolygon &, double, const basegfx::B2DVector &, const 
std::vector> *, basegfx::B2DLineJoin, 
com::sun::star::drawing::LineCap, double, bool)()
1743 // MM01 need to do line dashing as fallback stuff here now
1744 basegfx::B2DPolyPolygon aPolyPolygonLine;
1745 
1746 if(bStrokeUsed)
1747 {
1748 // apply LineStyle
>>> CID 1458168:(FORWARD_NULL)
>>> Passing null pointer "pStroke" to "applyLineDashing", which 
>>> dereferences it.
1749 basegfx::utils::applyLineDashing(
1750 rPolygon, // source
1751 *pStroke, // pattern
1752 , // target for lines
1753 nullptr, // target for gaps
1754 fDotDashLength); // full length if available
/vcl/unx/generic/gdi/gdiimpl.cxx: 1699 in 
X11SalGraphicsImpl::drawPolyLine(const basegfx::B2DHomMatrix &, const 
basegfx::B2DPolygon &, double, const basegfx::B2DVector &, const 
std::vector> *, basegfx::B2DLineJoin, 
com::sun::star::drawing::LineCap, double, bool)()
1693 {
1694 // MM01 - check on stroke change. Used against not used, or if 
oth used,
1695 // equal or different? Triangulation geometry creation depends 
heavily
1696 // on stroke, independent of being transformation independent
1697 const bool 
bStrokeWasUsed(!pSystemDependentData_Triangulation->getStroke().empty());
1698 
>>> CID 1458168:(FORWARD_NULL)
>>> Passing null pointer "pStroke" to "operator !=", which dereferences it.
1699 if(bStrokeWasUsed != bStrokeUsed
1700 || (bStrokeUsed && *pStroke != 
pSystemDependentData_Triangulation->getStroke()))
1701 {
1702 // data invalid, forget
1703 pSystemDependentData_Triangulation.reset();
1704 }

** CID 1458167:(FORWARD_NULL)



*** CID 1458167:(FORWARD_NULL)
/vcl/headless/svpgdi.cxx: 1381 in SvpSalGraphics::drawPolyLine(_cairo *, 
basegfx::B2DRange *, const Color &, bool, const basegfx::B2DHomMatrix &, const 
basegfx::B2DPolygon &, double, const basegfx::B2DVector &, const 
std::vector> *, basegfx::B2DLineJoin, 
com::sun::star::drawing::LineCap, double, bool)()
1375 // MM01 need to do line dashing as fallback stuff here now
1376 basegfx::B2DPolyPolygon aPolyPolygonLine;
1377 
1378 if(!bDoDirectCairoStroke && bStrokeUsed)
1379 {
1380 // apply LineStyle
>>> CID 1458167:(FORWARD_NULL)
>>> Passing null pointer "pStroke" to "applyLineDashing", which 
>>> dereferences it.
1381 basegfx::utils::applyLineDashing(
1382 rPolyLine, // source
1383 *pStroke, // pattern
1384 , // target for lines
1385 nullptr, // target for gaps
1386 fDotDashLength); // full length if available
/vcl/headless/svpgdi.cxx: 1340 in SvpSalGraphics::drawPolyLine(_cairo *, 
basegfx::B2DRange *, const Color &, bool, const basegfx::B2DHomMatrix &, const 
basegfx::B2DPolygon &, double, const basegfx::B2DVector &, const 
std::vector> *, basegfx::B2DLineJoin, 
com::sun::star::drawing::LineCap, double, bool)()
1334 if(!bDoDirectCairoStroke && pSystemDependentData_CairoPath)
1335 {
1336 // MM01 - check on stroke change. Used against not used, or if 
both used,
1337 // equal or different?
1338 const bool 
bStrokeWasUsed(!pSystemDependentData_CairoPath->getStroke().empty());
1339 
>>> CID 1458167:(FORWARD_NULL)
>>> Passing null pointer "pStroke" to "operator !=", which dereferences it.
1340 if(bStrokeWasUsed != bStrokeUsed
1341 || (bStrokeUsed && *pStroke != 
pSystemDependentData_CairoPath->getStroke()))
1342 {
1343 // data invalid, forget
1344 pSystemDependentData_CairoPath.reset();
1345 }
/vcl/headless/svpgdi.cxx: 1331 in SvpSalGraphics::drawPolyLine(_cairo *, 
basegfx::B2DRange *, const Color &, bool, const basegfx::B2DHomMatrix &, const 
basegfx::B2DPolygon &, double, const 

New Defects reported by Coverity Scan for LibreOffice

2020-02-07 Thread scan-admin
Hi,

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

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


** CID 1458164:  Error handling issues  (CHECKED_RETURN)
/svtools/source/control/ctrlbox.cxx: 1187 in FontSizeBox::get_value() const()



*** CID 1458164:  Error handling issues  (CHECKED_RETURN)
/svtools/source/control/ctrlbox.cxx: 1187 in FontSizeBox::get_value() const()
1181 return MetricField::ConvertValue(nValue, 0, 
GetDecimalDigits(), GetUnit(), GetUnit());
1182 }
1183 
1184 const SvtSysLocale aSysLocale;
1185 const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData();
1186 double fResult(0.0);
>>> CID 1458164:  Error handling issues  (CHECKED_RETURN)
>>> Calling "TextToValue" without checking return value (as is done 
>>> elsewhere 4 out of 5 times).
1187 MetricFormatter::TextToValue(aStr, fResult, 0, GetDecimalDigits(), 
rLocaleData, GetUnit());
1188 if (!aStr.isEmpty())
1189 {
1190 if (fResult < nMin)
1191 fResult = nMin;
1192 else if (fResult > nMax)



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/ls/click?upn=nJaKvJSIH-2FPAfmty-2BK5tYpPklAc1eEA-2F1zfUjH6teExViPHTTReBArhCRZ3BE4kCjKjDqn2Dq3ZyEbAvAs31gRpU3vMPHDnoSx68vDAWjNU-3D7sgD_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiYfKuIwtyOXSLLnMGLvLUa7UJagnHlTKNBKWwuvsLRVzTfwUSM-2FIXwWnyFwLSfOcDbzp4JBn-2FWE7mJsUvtLEi2IZK-2Bw6KuAAoP7ShN2ddVoP93GcLPhMBCd4NWezuiuPRM3LaC4XtPnT60bC2zKhjchrqB7kkZOe4T7-2FVr4-2Bx9Vaohh8HAKWaU-2BQ0fzkqjESq

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-02-05 Thread scan-admin
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 1458160:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/frmedt/fefly1.cxx: 948 in SwFEShell::InsertDrawObj(SdrObject &, 
const Point &)()



*** CID 1458160:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/frmedt/fefly1.cxx: 948 in SwFEShell::InsertDrawObj(SdrObject &, 
const Point &)()
942 SwContact* pContact = 
static_cast(rDrawObj.GetUserCall());
943 if ( pContact )
944 {
945 pContact->MoveObjToVisibleLayer(  );
946 }
947 
>>> CID 1458160:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pFormat" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
948 if ( pFormat )
949 {
950 // select drawing object
951 Imp()->GetDrawView()->MarkObj( , Imp()->GetPageView() 
);
952 }
953 else

** CID 1458159:  Null pointer dereferences  (FORWARD_NULL)
/qadevOOo/tests/java/ifc/lang/_XMultiComponentFactory.java: 113 in 
ifc.lang._XMultiComponentFactory._getAvailableServiceNames()()



*** CID 1458159:  Null pointer dereferences  (FORWARD_NULL)
/qadevOOo/tests/java/ifc/lang/_XMultiComponentFactory.java: 113 in 
ifc.lang._XMultiComponentFactory._getAvailableServiceNames()()
107 else { // if service names are given, ignore result
108 String[]erg = oObj.getAvailableServiceNames();
109 result = (erg != null);
110 }
111 
112 log.println("Available service names:");
>>> CID 1458159:  Null pointer dereferences  (FORWARD_NULL)
>>> Accessing length of null array "availableServiceNames".
113 for(int i = 0; i < availableServiceNames.length; i++) {
114 log.println("   " + availableServiceNames[i]);
115 }
116 
117 tRes.tested("getAvailableServiceNames()", result);
118 }

** CID 1458158:  Null pointer dereferences  (REVERSE_INULL)
/qadevOOo/tests/java/ifc/bridge/_XBridgeFactory.java: 131 in 
ifc.bridge._XBridgeFactory._getExistingBridges()()



*** CID 1458158:  Null pointer dereferences  (REVERSE_INULL)
/qadevOOo/tests/java/ifc/bridge/_XBridgeFactory.java: 131 in 
ifc.bridge._XBridgeFactory._getExistingBridges()()
125 log.println("Existing bridges :") ;
126 for (int i = 0; i < bridges.length; i++)
127 log.println("  " + bridges[i].getDescription()) ;
128 
129 if (bridges.length > 0) bridgeName = bridges[0].getName() ;
130 
>>> CID 1458158:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "bridges" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
131 tRes.tested("getExistingBridges()", bridges != null) ;
132 }
133 
134 /**
135 * First creates connection with StarOffice process, using 
environment
136 * property 'CONNECTION_STRING'. Then create bridge 
with unique name

** CID 1458157:  Null pointer dereferences  (REVERSE_INULL)
/qadevOOo/tests/java/ifc/lang/_XMultiServiceFactory.java: 78 in 
ifc.lang._XMultiServiceFactory._getAvailableServiceNames()()



*** CID 1458157:  Null pointer dereferences  (REVERSE_INULL)
/qadevOOo/tests/java/ifc/lang/_XMultiServiceFactory.java: 78 in 
ifc.lang._XMultiServiceFactory._getAvailableServiceNames()()
72 services = oObj.getAvailableServiceNames();
73 
74 for (int i = 0; i < services.length; i++) {
75 log.println("Service" + i + ": " + services[i]);
76 }
77 
>>> CID 1458157:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "services" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
78 tRes.tested("getAvailableServiceNames()", services != null);
79 }
80 
81 /**
82  * Test creates instance of the first service from names array
83  * get by getAvailableServiceNames(). If the array



To view the defects in Coverity Scan visit, 

New Defects reported by Coverity Scan for LibreOffice

2020-01-30 Thread scan-admin
Hi,

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

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


** CID 1458033:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1458033:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/utlui/content.cxx: 1778 in SwContentTree::Display(bool)()
1772 pSelEntry = pEntry;
1773 sal_Int32 nExpandOptions = (State::HIDDEN == m_eState)
1774 ? m_nHiddenBlock
1775 : m_nActiveBlock;
1776 if(nExpandOptions & (1 << static_cast(nCntType)))
1777 {
>>> CID 1458033:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pEntry" to "Expand", which dereferences it.
1778 Expand(pEntry);
1779 if(nEntryRelPos && nCntType == m_nLastSelType)
1780 {
1781 // Now maybe select an additional child
1782 SvTreeListEntry* pChild = pEntry;
1783 SvTreeListEntry* pTemp = nullptr;



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyxysW7rpEyl46cj7viDyaDaTzic7Q-2BUaZ9h5gbnHGOkEovnQ8wMMrVLSUs1iLp9aSOQ-2BgkJMDLqqPEh-2FAUOFMAPmBkBATIc7UhIw0Y-2B-2BrdqU2lpIDX1YWOvMWaAFJ5bgwjNCuRSFv1y-2FCo1gLvPIL98nQRINBXPXSK8F8L0bgP4PQIXwh-2B732e89tDGSHqTMN

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2020-01-29 Thread scan-admin
Hi,

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

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


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


** CID 1458020:  Insecure data handling  (TAINTED_SCALAR)
/svl/source/items/macitem.cxx: 110 in SvxMacroTableDtor::Read(SvStream &)()



*** CID 1458020:  Insecure data handling  (TAINTED_SCALAR)
/svl/source/items/macitem.cxx: 110 in SvxMacroTableDtor::Read(SvStream &)()
104 {
105 SAL_WARN("editeng", "Parsing error: " << nMaxRecords <<
106  " max possible entries, but " << nMacro<< " claimed, 
truncating");
107 nMacro = nMaxRecords;
108 }
109 
>>> CID 1458020:  Insecure data handling  (TAINTED_SCALAR)
>>> Using tainted variable "nMacro" as a loop boundary.
110 for (short i = 0; i < nMacro; ++i)
111 {
112 sal_uInt16 nCurKey, eType = STARBASIC;
113 OUString aLibName, aMacName;
114 rStrm.ReadUInt16( nCurKey );
115 aLibName = readByteString(rStrm);

** CID 1458019:  Memory - corruptions  (OVERRUN)
/svl/source/numbers/zforscan.cxx: 1645 in 
ImpSvNumberformatScan::InsertSymbol(unsigned short &, svt::NfSymbolType, const 
rtl::OUString &)()



*** CID 1458019:  Memory - corruptions  (OVERRUN)
/svl/source/numbers/zforscan.cxx: 1645 in 
ImpSvNumberformatScan::InsertSymbol(unsigned short &, svt::NfSymbolType, const 
rtl::OUString &)()
1639 {
1640 return false;
1641 }
1642 ++nStringsCnt;
1643 for (size_t i = nStringsCnt; i > nPos; --i)
1644 {
>>> CID 1458019:  Memory - corruptions  (OVERRUN)
>>> Overrunning array "this->nTypeArray" of 100 2-byte elements at element 
>>> index 100 (byte offset 201) using index "i" (which evaluates to 100).
1645 nTypeArray[i] = nTypeArray[i-1];
1646 sStrArray[i] = sStrArray[i-1];
1647 }
1648 }
1649 ++nResultStringsCnt;
1650 nTypeArray[nPos] = static_cast(eType);

** CID 1458018:  Insecure data handling  (TAINTED_SCALAR)
/filter/source/msfilter/svdfppt.cxx: 1231 in 
SdrEscherImport::ProcessObj(SvStream &, DffObjData &, SvxMSDffClientData &, 
tools::Rectangle &, SdrObject *)()



*** CID 1458018:  Insecure data handling  (TAINTED_SCALAR)
/filter/source/msfilter/svdfppt.cxx: 1231 in 
SdrEscherImport::ProcessObj(SvStream &, DffObjData &, SvxMSDffClientData &, 
tools::Rectangle &, SdrObject *)()
1225 }
1226 if (nRowCount > 0)
1227 {
1228 std::unique_ptr pTableArry(new 
sal_uInt32[ nRowCount + 2 ]);
1229 pTableArry[ 0 ] = nTableProperties;
1230 pTableArry[ 1 ] = nRowCount;
>>> CID 1458018:  Insecure data handling  (TAINTED_SCALAR)
>>> Using tainted variable "nRowCount" as a loop boundary.
1231 for ( i = 0; i < nRowCount; i++ )
1232 rSt.ReadUInt32( pTableArry[ i + 2 ] );
1233 rData.pTableRowProperties = 
std::move(pTableArry);
1234 }
1235 }
1236 }

** CID 1458017:  Memory - illegal accesses  (OVERRUN)
/svl/source/numbers/zforscan.cxx: 1646 in 
ImpSvNumberformatScan::InsertSymbol(unsigned short &, svt::NfSymbolType, const 
rtl::OUString &)()



*** CID 1458017:  Memory - illegal accesses  (OVERRUN)
/svl/source/numbers/zforscan.cxx: 1646 in 
ImpSvNumberformatScan::InsertSymbol(unsigned short &, svt::NfSymbolType, const 
rtl::OUString &)()
1640 return false;
1641 }
1642 ++nStringsCnt;
1643 for (size_t i = nStringsCnt; i > nPos; --i)
1644 {
1645 nTypeArray[i] = nTypeArray[i-1];
>>> CID 1458017:  Memory - illegal accesses  (OVERRUN)
>>> Overrunning array "this->sStrArray" of 100 8-byte elements at element 
>>> index 100 (byte offset 807) using index "i" (which evaluates to 100).
1646 sStrArray[i] = sStrArray[i-1];
1647 }
1648 }
1649 ++nResultStringsCnt;
1650 nTypeArray[nPos] = static_cast(eType);
1651 sStrArray[nPos] = rStr;

** CID 1458016:  Uninitialized members  (UNINIT_CTOR)
/sw/source/core/access/AccessibilityIssue.cxx: 22 in 
sw::AccessibilityIssue::AccessibilityIssue(sfx::AccessibilityIssueID)()



New Defects reported by Coverity Scan for LibreOffice

2020-01-11 Thread scan-admin
Hi,

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

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


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


** CID 1457618:  Error handling issues  (CHECKED_RETURN)
/svx/source/tbxctrls/tbcontrl.cxx: 3474 in 
SvxColorToolBoxControl::createPopupWindow(vcl::Window *)()



*** CID 1457618:  Error handling issues  (CHECKED_RETURN)
/svx/source/tbxctrls/tbcontrl.cxx: 3474 in 
SvxColorToolBoxControl::createPopupWindow(vcl::Window *)()
3468 
3469 const css::uno::Reference xParent = 
m_xFrame->getContainerWindow();
3470 weld::Window* pParentFrame = Application::GetFrameWeld(xParent);
3471 
3472 ToolBox* pToolBox = nullptr;
3473 sal_uInt16 nId = 0;
>>> CID 1457618:  Error handling issues  (CHECKED_RETURN)
>>> Calling "getToolboxId" without checking return value (as is done 
>>> elsewhere 32 out of 34 times).
3474 getToolboxId(nId, );
3475 
3476 auto xPopover = std::make_unique(
3477 m_aCommandURL,
3478 m_xPaletteManager,
3479 m_aColorStatus,

** CID 1457617:(CHECKED_RETURN)
/oox/source/export/chartexport.cxx: 1158 in 
oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference &)()
/oox/source/export/chartexport.cxx: 1108 in 
oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference &)()
/oox/source/export/chartexport.cxx: 1128 in 
oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference &)()



*** CID 1457617:(CHECKED_RETURN)
/oox/source/export/chartexport.cxx: 1158 in 
oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference &)()
1152 sal_Int32 nDataSeqSize = 
xValues->getData().getLength();
1153 nIndex += nDataSeqSize;
1154 }
1155 }
1156 else
1157 {
>>> CID 1457617:(CHECKED_RETURN)
>>> Calling "getProperty" without checking return value (as is done 
>>> elsewhere 23 out of 28 times).
1158 aSeriesProp.getProperty(bShowLegendEntry, 
PROP_ShowLegendEntry);
1159 if (!bShowLegendEntry)
1160 {
1161 pFS->startElement(FSNS(XML_c, 
XML_legendEntry));
1162 pFS->singleElement(FSNS(XML_c, XML_idx), 
XML_val,
1163
OString::number(nIndex));
/oox/source/export/chartexport.cxx: 1108 in 
oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference &)()
1102 sal_Int32 nIndex = 0;
1103 bool bShowLegendEntry;
1104 for (const auto& rCooSys : xCooSysSequence)
1105 {
1106 PropertySet aCooSysProp(rCooSys);
1107 bool bSwapXAndY = false;
>>> CID 1457617:(CHECKED_RETURN)
>>> Calling "getProperty" without checking return value (as is done 
>>> elsewhere 23 out of 28 times).
1108 aCooSysProp.getProperty(bSwapXAndY, PROP_SwapXAndYAxis);
1109 
1110 Reference 
xChartTypeContainer(rCooSys, UNO_QUERY_THROW);
 const Sequence> 
xChartTypeSequence(xChartTypeContainer->getChartTypes());
1112 if (!xChartTypeSequence.hasElements())
1113 continue;
/oox/source/export/chartexport.cxx: 1128 in 
oox::drawingml::ChartExport::exportLegend(const 
com::sun::star::uno::Reference &)()
1122 if (bSwapXAndY)
1123 nIndex += aDataSeriesSeq.getLength() - 1;
1124 for (const auto& rDataSeries : aDataSeriesSeq)
1125 {
1126 PropertySet aSeriesProp(rDataSeries);
1127 bool bVaryColorsByPoint = false;
>>> CID 1457617:(CHECKED_RETURN)
>>> Calling "getProperty" without checking return value (as is done 
>>> elsewhere 23 out of 28 times).
1128 aSeriesProp.getProperty(bVaryColorsByPoint, 
PROP_VaryColorsByPoint);
1129 if (bVaryColorsByPoint)
1130 {
1131 Sequence deletedLegendEntriesSeq;
1132 
aSeriesProp.getProperty(deletedLegendEntriesSeq, PROP_DeletedLegendEntries);
1133 for (auto& deletedLegendEntry : 
deletedLegendEntriesSeq)

** CID 1457616:  Error handling issues  (CHECKED_RETURN)
/svx/source/tbxctrls/tbcontrl.cxx: 3508 in 

New Defects reported by Coverity Scan for LibreOffice

2020-01-02 Thread scan-admin
Hi,

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

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


** CID 1456612:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1456612:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/core/access/AccessibilityCheck.cxx: 353 in 
swTextContrastCheck::checkTextRange(const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, 
SwTextNode *)()
347 const SwAttrSet& rPageSet = rPageFormat.GetAttrSet();
348 
349 const XFillStyleItem* pXFillStyleItem(
350 rPageSet.GetItem(XATTR_FILLSTYLE, 
false));
351 Color aPageBackground;
352 
>>> CID 1456612:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" "pXFillStyleItem" when 
>>> calling "GetValue".
353 if (pXFillStyleItem->GetValue() == 
css::drawing::FillStyle_SOLID)
354 {
355 const XFillColorItem* rXFillColorItem
356 = rPageSet.GetItem(XATTR_FILLCOLOR, 
false);
357 aPageBackground = rXFillColorItem->GetColorValue();
358 }

** CID 1456611:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/docshell/docsh.cxx: 1716 in 
ScDocShell::PrepareSaveGuard::~PrepareSaveGuard()()



*** CID 1456611:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/docshell/docsh.cxx: 1716 in 
ScDocShell::PrepareSaveGuard::~PrepareSaveGuard()()
1710 }
1711 }
1712 if (mrDocShell.GetCreateMode()== SfxObjectCreateMode::STANDARD)
1713 mrDocShell.SfxObjectShell::SetVisArea( tools::Rectangle() );   
// "Normally" worked on => no VisArea.
1714 }
1715 
>>> CID 1456611:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the throw list "noexcept" doesn't allow it to be thrown. This will 
>>> cause a call to unexpected() which usually calls terminate().
1716 ScDocShell::PrepareSaveGuard::~PrepareSaveGuard()
1717 {
1718 if (mrDocShell.m_aDocument.HasExternalRefManager())
1719 {
1720 ScExternalRefManager* pRefMgr = 
mrDocShell.m_aDocument.GetExternalRefManager();
1721 if (pRefMgr && pRefMgr->hasExternalData())

** CID 1456610:  Uninitialized members  (UNINIT_CTOR)
/include/vcl/pdfwriter.hxx: 640 in 
vcl::PDFWriter::PDFWriterContext::PDFWriterContext()()



*** CID 1456610:  Uninitialized members  (UNINIT_CTOR)
/include/vcl/pdfwriter.hxx: 640 in 
vcl::PDFWriter::PDFWriterContext::PDFWriterContext()()
634 Encryption(),
635 SignPDF( false ),
636 DPIx( 0 ),
637 DPIy( 0 ),
638 ColorMode( PDFWriter::DrawColor ),
639 UseReferenceXObject( false )
>>> CID 1456610:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "UniversalAccessibilityCompliance" is not 
>>> initialized in this constructor nor in any functions that it calls.
640 {}
641 };
642 
643 PDFWriter( const PDFWriterContext& rContext, const 
css::uno::Reference< css::beans::XMaterialHolder >& );
644 ~PDFWriter();
645 

** CID 1456609:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/drawinglayer/source/tools/emfppath.cxx: 31 in 
emfplushelper::GetEmfPlusInteger(int)()



*** CID 1456609:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/drawinglayer/source/tools/emfppath.cxx: 31 in 
emfplushelper::GetEmfPlusInteger(int)()
25 
26 namespace emfplushelper
27 {
28 static sal_Int16 GetEmfPlusInteger(sal_Int32 nInt)
29 {
30 if (nInt & 0x8000)
>>> CID 1456609:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
>>> "(nInt & 0x7fff) >> 16" is 0 regardless of the values of its operands. 
>>> This occurs as a return value.
31 return (nInt & 0x7FFF) >> 16;
32 
33 return nInt >> 24;
34 }
35 
36 EMFPPath::EMFPPath (sal_Int32 _nPoints, bool bLines)

** CID 1456608:  Null pointer dereferences  (FORWARD_NULL)




New Defects reported by Coverity Scan for LibreOffice

2019-12-01 Thread scan-admin
Hi,

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

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


** CID 1456145:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/sc/inc/markdata.hxx: 43 in ()



*** CID 1456145:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/sc/inc/markdata.hxx: 43 in ()
37 class ScMarkArray;
38 
39 //! todo:
40 //! It should be possible to have MarkArrays for each table, in 
order to
41 //! enable "search all" across more than one table again!
42 
>>> CID 1456145:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
>>> Class "ScMarkData" may benefit from adding a move assignment operator. 
>>> See other events which show the copy assignment operator being applied to 
>>> rvalue(s), where a move assignment may be faster.
43 class SC_DLLPUBLIC ScMarkData
44 {
45 public:
46 typedef std::set MarkedTabsType;
47 private:
48 MarkedTabsType  maTabMarked;



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy1X3VtGelz8uaEXkDFeepAGxjMsQNRgSSjzyTJwsHIUBlosHTi7LKppq2crHDUdGXlIkTt74aLGKz6UIYZW0-2FaF9qKwXeEgM6z5GZOTUvd-2FDuY8JMtjvhTguPdFyYsWoY51WH-2FHjhbCeU91Dz4FUYQp-2FElfycrWYuvKjtGk6N1E0-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-11-22 Thread scan-admin
Hi,

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

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


** CID 1455968:(UNCAUGHT_EXCEPT)
/canvas/workben/canvasdemo.cxx: 616 in ::DemoApp::Main()()
/canvas/workben/canvasdemo.cxx: 616 in ::DemoApp::Main()()



*** CID 1455968:(UNCAUGHT_EXCEPT)
/canvas/workben/canvasdemo.cxx: 616 in ::DemoApp::Main()()
610 void Init() override;
611 void DeInit() override;
612 };
613 
614 }
615 
>>> CID 1455968:(UNCAUGHT_EXCEPT)
>>> In function "::DemoApp::Main()" an exception of type 
>>> "com::sun::star::uno::RuntimeException" is thrown and never caught.
616 int DemoApp::Main()
617 {
618 bool bHelp = false;
619 
620 for( unsigned int i = 0; i < GetCommandLineParamCount(); i++ )
621 {
/canvas/workben/canvasdemo.cxx: 616 in ::DemoApp::Main()()
610 void Init() override;
611 void DeInit() override;
612 };
613 
614 }
615 
>>> CID 1455968:(UNCAUGHT_EXCEPT)
>>> In function "::DemoApp::Main()" an exception of type 
>>> "com::sun::star::uno::RuntimeException" is thrown and never caught.
616 int DemoApp::Main()
617 {
618 bool bHelp = false;
619 
620 for( unsigned int i = 0; i < GetCommandLineParamCount(); i++ )
621 {



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyw-2FarYZgYbx3ZoJZgLEuwIqrWh-2BnV9zk15ohhFOBNFilz75HEatn5GBCfMku9L00PjVPfauqb0G4sdclHhZVRR7gzsyyx5-2Bl3Gl2eEaAa0c7nzSzC1x8jWbzVahhxG8FO8tdRAjAqFHfX688JZx5BYtY-2B7IYc8F6b-2FT8GRQtzKkg-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-11-19 Thread scan-admin
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.
2 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 4 of 4 defect(s)


** CID 1399334:  Error handling issues  (UNCAUGHT_EXCEPT)
/sd/source/ui/slidesorter/controller/SlideSorterController.cxx: 905 in 
sd::slidesorter::controller::SlideSorterController::ModelChangeLock::~ModelChangeLock()()



*** CID 1399334:  Error handling issues  (UNCAUGHT_EXCEPT)
/sd/source/ui/slidesorter/controller/SlideSorterController.cxx: 905 in 
sd::slidesorter::controller::SlideSorterController::ModelChangeLock::~ModelChangeLock()()
899 SlideSorterController& rController)
900 : mpController()
901 {
902 mpController->LockModelChange();
903 }
904 
>>> CID 1399334:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the throw list "noexcept" doesn't allow it to be thrown. This will 
>>> cause a call to unexpected() which usually calls terminate().
905 SlideSorterController::ModelChangeLock::~ModelChangeLock()
906 {
907 Release();
908 }
909 
910 void SlideSorterController::ModelChangeLock::Release()

** CID 1399224:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/column.cxx: 92 in ScColumn::~ScColumn()()



*** CID 1399224:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/column.cxx: 92 in ScColumn::~ScColumn()()
86 nCol( 0 ),
87 nTab( 0 )
88 {
89 maCells.resize(MAXROWCOUNT);
90 }
91 
>>> CID 1399224:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::out_of_range" is thrown but the throw list 
>>> "noexcept" doesn't allow it to be thrown. This will cause a call to 
>>> unexpected() which usually calls terminate().
92 ScColumn::~ScColumn()
93 {
94 FreeAll();
95 }
96 
97 void ScColumn::Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc, bool 
bEmptyAttrArray)

** CID 1399153:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/column.cxx: 92 in ScColumn::~ScColumn()()



*** CID 1399153:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/column.cxx: 92 in ScColumn::~ScColumn()()
86 nCol( 0 ),
87 nTab( 0 )
88 {
89 maCells.resize(MAXROWCOUNT);
90 }
91 
>>> CID 1399153:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "mdds::general_error" is thrown but the throw list 
>>> "noexcept" doesn't allow it to be thrown. This will cause a call to 
>>> unexpected() which usually calls terminate().
92 ScColumn::~ScColumn()
93 {
94 FreeAll();
95 }
96 
97 void ScColumn::Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc, bool 
bEmptyAttrArray)

** CID 1399090:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/colorscale.cxx: 200 in 
ScColorScaleEntry::~ScColorScaleEntry()()



*** CID 1399090:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/colorscale.cxx: 200 in 
ScColorScaleEntry::~ScColorScaleEntry()()
194 mpListener.reset(new ScFormulaListener(mpCell.get()));
195 if (mpFormat)
196 mpListener->setCallback([&]() { mpFormat->DoRepaint();});
197 }
198 }
199 
>>> CID 1399090:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "mdds::general_error" is thrown but the throw list 
>>> "noexcept" doesn't allow it to be thrown. This will cause a call to 
>>> unexpected() which usually calls terminate().
200 ScColorScaleEntry::~ScColorScaleEntry()
201 {
202 if(mpCell)
203 mpCell->EndListeningTo(mpCell->GetDocument());
204 }
205 



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyoRjyaWEFqREsFBxJuZ4VblGtCkizO0mJumYbhcrOq5Fk6DdOgflbL6jbf4I0yLeSfwG-2FFKch3udhbqpGwiEn-2BkvR3P9cNp9VL99ilriVm1VIkRn2QNsxA-2BDpIk1CvAXIYg7ROc0CdapmAKmqmppu5gAMjlX4emK4ye5vgHG2DPI-3D

___
LibreOffice 

New Defects reported by Coverity Scan for LibreOffice

2019-11-16 Thread scan-admin
Hi,

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

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


** CID 1455745:  API usage errors  (STREAM_FORMAT_STATE)
/include/tools/color.hxx: 323 in operator <<>(std::basic_ostream &, const Color &)()



*** CID 1455745:  API usage errors  (STREAM_FORMAT_STATE)
/include/tools/color.hxx: 323 in operator <<>(std::basic_ostream &, const Color &)()
317 constexpr ::Color COL_AUTHOR9_NORMAL  ( 255,  226, 185 );
318 constexpr ::Color COL_AUTHOR9_LIGHT   ( 255,  231, 199 );
319 
320 template
321 inline std::basic_ostream& operator 
<<(std::basic_ostream& rStream, const Color& rColor)
322 {
>>> CID 1455745:  API usage errors  (STREAM_FORMAT_STATE)
>>> Changing format state of stream "rStream" for categories basefield, 
>>> fill without later restoring it.
323 return rStream << "c[" << std::hex << std::setfill ('0')
324<< std::setw(2) << static_cast(rColor.GetRed())
325<< std::setw(2) << 
static_cast(rColor.GetGreen())
326<< std::setw(2) << static_cast(rColor.GetBlue())
327<< std::setw(2) << 
static_cast(rColor.GetTransparency()) << "]";
328 }
329 
330 #endif
331 



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy2-2BfzNN3ayqncvFf9qePhxnJQ-2BplIIKc-2F8QR9EP7-2FyFNMqSp-2FMoHMiOQ1-2FBf0HKmTkiYKTKCiA1Vi5CDLXqQbZu38YKHaqum4nDMcCt2eJyo6OC1hx2-2FWBSihNR-2FmfFYCrDy-2BLWAiLK5Yqewg5Jm5141Ttz5urtmJGsVO-2F-2FZbdTI-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Re: New Defects reported by Coverity Scan for LibreOffice

2019-11-14 Thread Szymon Kłos
Hi,

I will fix it.

Szymon

W dniu czw, 14.11.2019 o godzinie 10∶06 +, użytkownik Caolán
McNamara napisał:
> On Thu, 2019-11-14 at 08:10 +, scan-ad...@coverity.com wrote:
> > Hi,
> > 
> > Please find the latest report on new defect(s) introduced to
> > LibreOffice found with Coverity Scan.
> 
> The below is new since...
> 
> commit a3c7a8282ddd08c7ed4a15d23089d09e418f8fae
> Author: Szymon Kłos 
> Date:   Fri Nov 8 17:13:05 2019 +0100
> 
> jsdialogs: apply .uno:Color and CharBackColor to floating text
> frames
> 
> I'm not sure what the right fix should be.
> 
> > 2 new defect(s) introduced to LibreOffice found with Coverity Scan.
> > 5 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 2 of 2 defect(s)
> > 
> > 
> > ** CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
> > /sw/source/uibase/shells/drwtxtex.cxx: 660 in
> > SwDrawTextShell::Execute(SfxRequest &)()
> > 
> > 
> > ___
> > __
> > ___
> > *** CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
> > /sw/source/uibase/shells/drwtxtex.cxx: 660 in
> > SwDrawTextShell::Execute(SfxRequest &)()
> > 654 return;
> > 655 }
> > 656 
> > 657 std::unique_ptr pNewArgs = pNewAttrs-
> > > Clone();
> > 
> > 658 lcl_convertStringArguments(nSlot, pNewArgs);
> > 659 
> > > > > CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
> > > > > Null-checking "pNewAttrs" suggests that it may be null,
> > > > > but
> > > > > it has already been dereferenced on all paths leading to the
> > > > > check.
> > 
> > 660 if(nEEWhich && pNewAttrs)
> > 661 {
> > 662 std::unique_ptr pNewItem(pNewArgs-
> > > Get(nWhich).CloneSetWhich(nEEWhich));
> > 
> > 663 pNewArgs->Put(*pNewItem);
> > 664 }
> > 665 
> > 
> > ** CID 1455690:(FORWARD_NULL)
> > /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> > SwDrawTextShell::Execute(SfxRequest &)()
> > /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> > SwDrawTextShell::Execute(SfxRequest &)()
> > /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> > SwDrawTextShell::Execute(SfxRequest &)()
> > 
> > 
> > ___
> > __
> > ___
> > *** CID 1455690:(FORWARD_NULL)
> > /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> > SwDrawTextShell::Execute(SfxRequest &)()
> > 651 
> > 652 default:
> > 653 assert(false && "wrong dispatcher");
> > 654 return;
> > 655 }
> > 656 
> > > > > CID 1455690:(FORWARD_NULL)
> > > > > Passing null pointer "pNewAttrs" to "Clone", which
> > > > > dereferences it. (The dereference happens because this is a
> > > > > virtual function call.)
> > 
> > 657 std::unique_ptr pNewArgs = pNewAttrs-
> > > Clone();
> > 
> > 658 lcl_convertStringArguments(nSlot, pNewArgs);
> > 659 
> > 660 if(nEEWhich && pNewAttrs)
> > 661 {
> > 662 std::unique_ptr pNewItem(pNewArgs-
> > > Get(nWhich).CloneSetWhich(nEEWhich));
> > 
> > /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> > SwDrawTextShell::Execute(SfxRequest &)()
> > 651 
> > 652 default:
> > 653 assert(false && "wrong dispatcher");
> > 654 return;
> > 655 }
> > 656 
> > > > > CID 1455690:(FORWARD_NULL)
> > > > > Passing null pointer "pNewAttrs" to "Clone", which
> > > > > dereferences it. (The dereference happens because this is a
> > > > > virtual function call.)
> > 
> > 657 std::unique_ptr pNewArgs = pNewAttrs-
> > > Clone();
> > 
> > 658 lcl_convertStringArguments(nSlot, pNewArgs);
> > 659 
> > 660 if(nEEWhich && pNewAttrs)
> > 661 {
> > 662 std::unique_ptr pNewItem(pNewArgs-
> > > Get(nWhich).CloneSetWhich(nEEWhich));
> > 
> > /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> > SwDrawTextShell::Execute(SfxRequest &)()
> > 651 
> > 652 default:
> > 653 assert(false && "wrong dispatcher");
> > 654 return;
> > 655 }
> > 656 
> > > > > CID 1455690:(FORWARD_NULL)
> > > > > Passing null pointer "pNewAttrs" to "Clone", which
> > > > > dereferences it. (The dereference happens because this is a
> > > > > virtual function call.)
> > 
> > 657 std::unique_ptr pNewArgs = pNewAttrs-
> > > Clone();
> > 
> > 658 lcl_convertStringArguments(nSlot, pNewArgs);
> > 659 
> > 660 if(nEEWhich && pNewAttrs)
> > 661 {
> > 662 std::unique_ptr pNewItem(pNewArgs-
> > > Get(nWhich).CloneSetWhich(nEEWhich));
> 
> 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org

Re: New Defects reported by Coverity Scan for LibreOffice

2019-11-14 Thread Caolán McNamara
On Thu, 2019-11-14 at 08:10 +, scan-ad...@coverity.com wrote:
> Hi,
> 
> Please find the latest report on new defect(s) introduced to
> LibreOffice found with Coverity Scan.

The below is new since...

commit a3c7a8282ddd08c7ed4a15d23089d09e418f8fae
Author: Szymon Kłos 
Date:   Fri Nov 8 17:13:05 2019 +0100

jsdialogs: apply .uno:Color and CharBackColor to floating text
frames

I'm not sure what the right fix should be.

> 2 new defect(s) introduced to LibreOffice found with Coverity Scan.
> 5 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 2 of 2 defect(s)
> 
> 
> ** CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
> /sw/source/uibase/shells/drwtxtex.cxx: 660 in
> SwDrawTextShell::Execute(SfxRequest &)()
> 
> 
> _
> ___
> *** CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
> /sw/source/uibase/shells/drwtxtex.cxx: 660 in
> SwDrawTextShell::Execute(SfxRequest &)()
> 654 return;
> 655 }
> 656 
> 657 std::unique_ptr pNewArgs = pNewAttrs-
> >Clone();
> 658 lcl_convertStringArguments(nSlot, pNewArgs);
> 659 
> > > > CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
> > > > Null-checking "pNewAttrs" suggests that it may be null, but
> > > > it has already been dereferenced on all paths leading to the
> > > > check.
> 660 if(nEEWhich && pNewAttrs)
> 661 {
> 662 std::unique_ptr pNewItem(pNewArgs-
> >Get(nWhich).CloneSetWhich(nEEWhich));
> 663 pNewArgs->Put(*pNewItem);
> 664 }
> 665 
> 
> ** CID 1455690:(FORWARD_NULL)
> /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> SwDrawTextShell::Execute(SfxRequest &)()
> /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> SwDrawTextShell::Execute(SfxRequest &)()
> /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> SwDrawTextShell::Execute(SfxRequest &)()
> 
> 
> _
> ___
> *** CID 1455690:(FORWARD_NULL)
> /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> SwDrawTextShell::Execute(SfxRequest &)()
> 651 
> 652 default:
> 653 assert(false && "wrong dispatcher");
> 654 return;
> 655 }
> 656 
> > > > CID 1455690:(FORWARD_NULL)
> > > > Passing null pointer "pNewAttrs" to "Clone", which
> > > > dereferences it. (The dereference happens because this is a
> > > > virtual function call.)
> 657 std::unique_ptr pNewArgs = pNewAttrs-
> >Clone();
> 658 lcl_convertStringArguments(nSlot, pNewArgs);
> 659 
> 660 if(nEEWhich && pNewAttrs)
> 661 {
> 662 std::unique_ptr pNewItem(pNewArgs-
> >Get(nWhich).CloneSetWhich(nEEWhich));
> /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> SwDrawTextShell::Execute(SfxRequest &)()
> 651 
> 652 default:
> 653 assert(false && "wrong dispatcher");
> 654 return;
> 655 }
> 656 
> > > > CID 1455690:(FORWARD_NULL)
> > > > Passing null pointer "pNewAttrs" to "Clone", which
> > > > dereferences it. (The dereference happens because this is a
> > > > virtual function call.)
> 657 std::unique_ptr pNewArgs = pNewAttrs-
> >Clone();
> 658 lcl_convertStringArguments(nSlot, pNewArgs);
> 659 
> 660 if(nEEWhich && pNewAttrs)
> 661 {
> 662 std::unique_ptr pNewItem(pNewArgs-
> >Get(nWhich).CloneSetWhich(nEEWhich));
> /sw/source/uibase/shells/drwtxtex.cxx: 657 in
> SwDrawTextShell::Execute(SfxRequest &)()
> 651 
> 652 default:
> 653 assert(false && "wrong dispatcher");
> 654 return;
> 655 }
> 656 
> > > > CID 1455690:(FORWARD_NULL)
> > > > Passing null pointer "pNewAttrs" to "Clone", which
> > > > dereferences it. (The dereference happens because this is a
> > > > virtual function call.)
> 657 std::unique_ptr pNewArgs = pNewAttrs-
> >Clone();
> 658 lcl_convertStringArguments(nSlot, pNewArgs);
> 659 
> 660 if(nEEWhich && pNewAttrs)
> 661 {
> 662 std::unique_ptr pNewItem(pNewArgs-
> >Get(nWhich).CloneSetWhich(nEEWhich));

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-11-14 Thread scan-admin
Hi,

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

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


** CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/uibase/shells/drwtxtex.cxx: 660 in 
SwDrawTextShell::Execute(SfxRequest &)()



*** CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/uibase/shells/drwtxtex.cxx: 660 in 
SwDrawTextShell::Execute(SfxRequest &)()
654 return;
655 }
656 
657 std::unique_ptr pNewArgs = pNewAttrs->Clone();
658 lcl_convertStringArguments(nSlot, pNewArgs);
659 
>>> CID 1455691:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pNewAttrs" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
660 if(nEEWhich && pNewAttrs)
661 {
662 std::unique_ptr 
pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));
663 pNewArgs->Put(*pNewItem);
664 }
665 

** CID 1455690:(FORWARD_NULL)
/sw/source/uibase/shells/drwtxtex.cxx: 657 in 
SwDrawTextShell::Execute(SfxRequest &)()
/sw/source/uibase/shells/drwtxtex.cxx: 657 in 
SwDrawTextShell::Execute(SfxRequest &)()
/sw/source/uibase/shells/drwtxtex.cxx: 657 in 
SwDrawTextShell::Execute(SfxRequest &)()



*** CID 1455690:(FORWARD_NULL)
/sw/source/uibase/shells/drwtxtex.cxx: 657 in 
SwDrawTextShell::Execute(SfxRequest &)()
651 
652 default:
653 assert(false && "wrong dispatcher");
654 return;
655 }
656 
>>> CID 1455690:(FORWARD_NULL)
>>> Passing null pointer "pNewAttrs" to "Clone", which dereferences it. 
>>> (The dereference happens because this is a virtual function call.)
657 std::unique_ptr pNewArgs = pNewAttrs->Clone();
658 lcl_convertStringArguments(nSlot, pNewArgs);
659 
660 if(nEEWhich && pNewAttrs)
661 {
662 std::unique_ptr 
pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));
/sw/source/uibase/shells/drwtxtex.cxx: 657 in 
SwDrawTextShell::Execute(SfxRequest &)()
651 
652 default:
653 assert(false && "wrong dispatcher");
654 return;
655 }
656 
>>> CID 1455690:(FORWARD_NULL)
>>> Passing null pointer "pNewAttrs" to "Clone", which dereferences it. 
>>> (The dereference happens because this is a virtual function call.)
657 std::unique_ptr pNewArgs = pNewAttrs->Clone();
658 lcl_convertStringArguments(nSlot, pNewArgs);
659 
660 if(nEEWhich && pNewAttrs)
661 {
662 std::unique_ptr 
pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));
/sw/source/uibase/shells/drwtxtex.cxx: 657 in 
SwDrawTextShell::Execute(SfxRequest &)()
651 
652 default:
653 assert(false && "wrong dispatcher");
654 return;
655 }
656 
>>> CID 1455690:(FORWARD_NULL)
>>> Passing null pointer "pNewAttrs" to "Clone", which dereferences it. 
>>> (The dereference happens because this is a virtual function call.)
657 std::unique_ptr pNewArgs = pNewAttrs->Clone();
658 lcl_convertStringArguments(nSlot, pNewArgs);
659 
660 if(nEEWhich && pNewAttrs)
661 {
662 std::unique_ptr 
pNewItem(pNewArgs->Get(nWhich).CloneSetWhich(nEEWhich));



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyMBjgoBPr6OvIPI1yFkizWcx7rLkipIryJLRhQeJLwz40KB7lraFV86-2BYG7UV4k7LWe1JWkgJOBLbZeO1kt4nAuhV-2FD3Uv0hIM1IsP7j2yhjqjzv8Z35msFxwQzKPZiE-2F-2BopuQeykj-2FAvexQx6h90aOAj5h8DG-2BS1GhBfL8tjvHA-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-11-09 Thread scan-admin
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 1455328:  Uninitialized members  (UNINIT_CTOR)
/include/basegfx/DrawCommands.hxx: 70 in 
gfx::LinearGradientInfo::LinearGradientInfo()()



*** CID 1455328:  Uninitialized members  (UNINIT_CTOR)
/include/basegfx/DrawCommands.hxx: 70 in 
gfx::LinearGradientInfo::LinearGradientInfo()()
64 class LinearGradientInfo : public GradientInfo
65 {
66 public:
67 LinearGradientInfo()
68 : GradientInfo(GradientType::Linear)
69 {
>>> CID 1455328:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "y2" is not initialized in this constructor nor 
>>> in any functions that it calls.
70 }
71 
72 double x1;
73 double y1;
74 double x2;
75 double y2;

** CID 1455327:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1455327:  Null pointer dereferences  (NULL_RETURNS)
/sc/source/ui/navipi/navcitem.cxx: 53 in 
ScNavigatorControllerItem::StateChanged(unsigned short, SfxItemState, const 
SfxPoolItem *)()
47 OSL_ENSURE( pCellPosItem, "SfxStringItem expected!" );
48 
49 if ( pCellPosItem )
50 {
51 const OUString&  aAddress( pCellPosItem->GetValue() 
);
52 ScAddress aScAddress;
>>> CID 1455327:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be "nullptr" 
>>> "this->rNavigatorDlg->GetViewData()" when calling "GetDocument".
53 aScAddress.Parse( aAddress, 
rNavigatorDlg.GetViewData()->GetDocument() );
54 
55 SCCOL nCol = aScAddress.Col()+1;
56 SCROW nRow = aScAddress.Row()+1;
57 
58 rNavigatorDlg.UpdateColumn(  );

** CID 1455326:(FORWARD_NULL)



*** CID 1455326:(FORWARD_NULL)
/sc/source/core/tool/address.cxx: 2381 in ScRange::MoveSticky(const ScDocument 
*, short, int, short, ScRange&)()
2375 dy = 0; // Entire column not to be moved.
2376 if (dx && aStart.Col() == 0 && aEnd.Col() == nMaxCol)
2377 dx = 0; // Entire row not to be moved.
2378 bool b1 = aStart.Move( dx, dy, dz, rErrorRange.aStart );
2379 if (dx && bColRange && aEnd.Col() == nMaxCol)
2380 dx = 0; // End column sticky.
>>> CID 1455326:(FORWARD_NULL)
>>> Passing null pointer "pDoc" to "MaxRow", which dereferences it.
2381 if (dy && bRowRange && aEnd.Row() == pDoc->MaxRow())
2382 dy = 0; // End row sticky.
2383 SCTAB nOldTab = aEnd.Tab();
2384 bool b2 = aEnd.Move( dx, dy, dz, rErrorRange.aEnd );
2385 if (!b2)
2386 {
/sc/source/core/tool/address.cxx: 2374 in ScRange::MoveSticky(const ScDocument 
*, short, int, short, ScRange&)()
2368 
2369 bool ScRange::MoveSticky( const ScDocument* pDoc, SCCOL dx, SCROW dy, 
SCTAB dz, ScRange& rErrorRange )
2370 {
2371 const SCCOL nMaxCol = (pDoc ? pDoc->MaxCol() : MAXCOL);
2372 bool bColRange = (aStart.Col() < aEnd.Col());
2373 bool bRowRange = (aStart.Row() < aEnd.Row());
>>> CID 1455326:(FORWARD_NULL)
>>> Passing null pointer "pDoc" to "MaxRow", which dereferences it.
2374 if (dy && aStart.Row() == 0 && aEnd.Row() == pDoc->MaxRow())
2375 dy = 0; // Entire column not to be moved.
2376 if (dx && aStart.Col() == 0 && aEnd.Col() == nMaxCol)
2377 dx = 0; // Entire row not to be moved.
2378 bool b1 = aStart.Move( dx, dy, dz, rErrorRange.aStart );
2379 if (dx && bColRange && aEnd.Col() == nMaxCol)

** CID 1455325:(FORWARD_NULL)



*** CID 1455325:(FORWARD_NULL)
/sc/source/core/tool/address.cxx: 2282 in ScRange::Format(ScRefFlags, const 
ScDocument *, const ScAddress::Details &, bool) const()
2276 if( aStart.Row() != aEnd.Row() ||
2277 lcl_RowAbsFlagDiffer( nFlags ) ) {
2278 r.append(":");
2279 lcl_r1c1_append_r( r, aEnd.Row(), (nFlags & 
ScRefFlags::ROW2_ABS) != ScRefFlags::ZERO, rDetails );
2280 }
2281 }
>>> CID 1455325:(FORWARD_NULL)
>>> 

New Defects reported by Coverity Scan for LibreOffice

2019-11-02 Thread scan-admin
Hi,

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

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


** CID 1455216:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/uibase/shells/basesh.cxx: 2367 in SwBaseShell::ExecBckCol(SfxRequest 
&)()



*** CID 1455216:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/uibase/shells/basesh.cxx: 2367 in SwBaseShell::ExecBckCol(SfxRequest 
&)()
2361 SvxColorItem aNewColorItem(nSlotId);
2362 aNewColorItem.SetValue(aColor);
2363 
2364 
GetView().GetViewFrame()->GetBindings().SetState(aNewColorItem);
2365 }
2366 }
>>> CID 1455216:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pArgs" suggests that it may be null, but it has already 
>>> been dereferenced on all paths leading to the check.
2367 else if(pArgs)
2368 {
2369 const SvxColorItem& rNewColorItem = static_cast(pArgs->Get(nSlotId));
2370 const Color& rNewColor = rNewColorItem.GetValue();
2371 aBrushItem->SetColor(rNewColor);
2372 
GetView().GetViewFrame()->GetBindings().SetState(rNewColorItem);

** CID 1455215:  Integer handling issues  (NEGATIVE_RETURNS)



*** CID 1455215:  Integer handling issues  (NEGATIVE_RETURNS)
/sd/source/filter/eppt/pptx-animations.cxx: 1057 in 
::PPTXAnimationExport::WriteAnimationNodeCommonPropsStart()()
1051 sal_Int16 nFill = AnimationExporter::GetFillMode(rXNode, 
AnimationFill::AUTO);
1052 pFill = convertAnimationFill(nFill);
1053 }
1054 
1055 bool bAutoReverse = rXNode->getAutoReverse();
1056 
>>> CID 1455215:  Integer handling issues  (NEGATIVE_RETURNS)
>>> "nPresetSubType" is passed to a parameter that cannot be negative.
1057 mpFS->startElementNS(
1058 XML_p, XML_cTn, XML_id, 
OString::number(GetNextAnimationNodeId(rXNode)), XML_dur,
1059 fDuration != 0 ? 
OString::number(static_cast(fDuration * 1000.0)).getStr()
1060: pDuration,
1061 XML_autoRev, bAutoReverse ? "1" : nullptr, XML_restart, 
pRestart, XML_nodeType, pNodeType,
1062 XML_fill, pFill, XML_presetClass, pPresetClass, XML_presetID,

** CID 1455214:  Uninitialized variables  (UNINIT)



*** CID 1455214:  Uninitialized variables  (UNINIT)
/sc/source/filter/rtf/eeimpars.cxx: 336 in ScEEImport::WriteToDocument(bool, 
double, SvNumberFormatter *, bool)()
330 aParam.mbDetectNumberFormat = true;
331 aParam.meSetTextNumFormat = 
ScSetStringParam::SpecialNumberOnly;
332 aParam.mbHandleApostrophe = false;
333 aParam.mbCheckLinkFormula = true;
334 
335 if (!aValStr.isEmpty())
>>> CID 1455214:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "fVal" when calling "SetValue".
336 mpDoc->SetValue( nCol, nRow, nTab, fVal );
337 else if ( !pE->aSel.HasRange() )
338 {
339 // maybe ALT text of IMG or similar
340 mpDoc->SetString( nCol, nRow, nTab, pE->aAltText, 
 );
341 // If SelRange is completely empty, the succeeding 
text can be in the same paragraph!

** CID 1455213:(FORWARD_NULL)



*** CID 1455213:(FORWARD_NULL)
/sc/source/core/tool/address.cxx: 1283 in lcl_ScAddress_Parse_OOo(const 
char16_t *, const ScDocument *, ScAddress &, ScRefFlags &, 
ScAddress::ExternalInfo *, ScRange *, int *, const rtl::OUString *)()
1277 }
1278 else
1279 {
1280 if (rtl::isAsciiAlpha( *p ))
1281 {
1282 nCol = sal::static_int_cast( 
rtl::toAsciiUpperCase( *p++ ) - 'A' );
>>> CID 1455213:(FORWARD_NULL)
>>> Passing null pointer "pDoc" to "MaxCol", which dereferences it.
1283 while (nCol < pDoc->MaxCol() && rtl::isAsciiAlpha(*p))
1284 nCol = sal::static_int_cast( ((nCol + 1) * 
26) + rtl::toAsciiUpperCase( *p++ ) - 'A' );
1285 }
1286 else
1287 

New Defects reported by Coverity Scan for LibreOffice

2019-10-28 Thread scan-admin
Hi,

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

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


** CID 1455158:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1455158:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/navipi/content.cxx: 1399 in ScContentTree::DoDrag()()
1393 }
1394 else if ( nType == ScContentId::TABLE )
1395 {
1396 SCTAB nTab;
1397 if ( rSrcDoc.GetTable( aText, nTab ) )
1398 {
>>> CID 1455158:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pLocalDoc" to "MaxCol", which dereferences it.
1399 ScRange aRange( 0,0,nTab, 
pLocalDoc->MaxCol(), pLocalDoc->MaxRow(),nTab );
1400 lcl_DoDragCells( pSrcShell, aRange, 
(ScDragSrc::Navigator | ScDragSrc::Table), this );
1401 }
1402 }
1403 else if ( nType == ScContentId::GRAPHIC || 
nType == ScContentId::OLEOBJECT ||
1404 nType == ScContentId::DRAWING )

** CID 1455157:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/sw/source/core/doc/DocumentContentOperationsManager.cxx: 580 in 
::lcl_CalcBreaks(std::vector, 
std::allocator>> &, const SwPaM &, bool)()



*** CID 1455157:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/sw/source/core/doc/DocumentContentOperationsManager.cxx: 580 in 
::lcl_CalcBreaks(std::vector, 
std::allocator>> &, const SwPaM &, bool)()
574 }
575 }
576 while (!startedFields.empty())
577 {
578 auto const& pField(startedFields.top());
579 startedFields.pop();
>>> CID 1455157:  Memory - illegal accesses  (WRAPPER_ESCAPE)
>>> Using invalidated internal representation of local "startedFields".
580 SwPosition const& rStart(pField->GetMarkStart());
581 std::pair const pos(
582 rStart.nNode.GetIndex(), 
rStart.nContent.GetIndex());
583 auto it = std::lower_bound(rBreaks.begin(), rBreaks.end(), 
pos);
584 assert(it == rBreaks.end() || *it != pos);
585 rBreaks.insert(it, pos);



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyOmqbPR5A7psYzrODPfF869iSu3jNlINfssbKwpec5p7laPe1R2ei4rgUq-2BApp92fCJwedtb85bWaGT-2FBlRDg2JxvjD3LiwdtPyQX383AjQl-2FhMJHTwhhye8T8BPkKpHhaXk4c0oeXCgFfM-2FnLw9kET1ynWfgbyI-2B2NtMNrK7poI-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-10-20 Thread scan-admin
Hi,

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

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


** CID 1454871:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/dbgui/csvruler.cxx: 99 in ScCsvRuler::ScCsvRuler(ScCsvLayoutData 
&, ScCsvTableBox *)()



*** CID 1454871:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/dbgui/csvruler.cxx: 99 in ScCsvRuler::ScCsvRuler(ScCsvLayoutData 
&, ScCsvTableBox *)()
93 ScCsvRuler::ScCsvRuler(ScCsvLayoutData& rData, ScCsvTableBox* pTableBox)
94 : ScCsvControl(rData)
95 , mpTableBox(pTableBox)
96 , mnPosCursorLast(1)
97 , mbTracking(false)
98 {
>>> CID 1454871:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mnSplitSize" is not initialized in this 
>>> constructor nor in any functions that it calls.
99 }
100 
101 void ScCsvRuler::SetDrawingArea(weld::DrawingArea* pDrawingArea)
102 {
103 ScCsvControl::SetDrawingArea(pDrawingArea);
104 



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyyvuEPnWvAhyDxNK4vGmohB6-2BCn2V4vf-2B-2BrwNTRC3QWk5pxeJE5l-2BjRmydmWBRawHSQFeZ0SZ0QDrMYUbai85ehPnNs-2F0Q4VYSaYlh1TDm63hhxgtmmG-2BpnuiH3OM1EwQS0LidjSz4jOsmdNujnVmvJMbq-2FltbAIIpWQ-2Frau4vAE-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-10-17 Thread scan-admin
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.
2 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 4 of 4 defect(s)


** CID 1454849:  Control flow issues  (DEADCODE)
/sc/source/ui/unoobj/docuno.cxx: 2027 in ScModelObj::render(int, const 
com::sun::star::uno::Any &, const 
com::sun::star::uno::Sequence &)()



*** CID 1454849:  Control flow issues  (DEADCODE)
/sc/source/ui/unoobj/docuno.cxx: 2027 in ScModelObj::render(int, const 
com::sun::star::uno::Any &, const 
com::sun::star::uno::Sequence &)()
2021 }
2022 }
2023 } aDrawViewKeeper;
2024 
2025 SCTAB nTab;
2026 if (bSinglePageSheets)
>>> CID 1454849:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "nTab = nSelRenderer;".
2027 nTab = nSelRenderer;
2028 if ( !maValidPages.empty() )
2029 nTab = pPrintFuncCache->GetTabForPage( maValidPages.at( 
nRenderer )-1 );
2030 else
2031 nTab = pPrintFuncCache->GetTabForPage( nRenderer );
2032 

** CID 1454848:  Code maintainability issues  (UNUSED_VALUE)
/sc/source/ui/unoobj/docuno.cxx: 2027 in ScModelObj::render(int, const 
com::sun::star::uno::Any &, const 
com::sun::star::uno::Sequence &)()



*** CID 1454848:  Code maintainability issues  (UNUSED_VALUE)
/sc/source/ui/unoobj/docuno.cxx: 2027 in ScModelObj::render(int, const 
com::sun::star::uno::Any &, const 
com::sun::star::uno::Sequence &)()
2021 }
2022 }
2023 } aDrawViewKeeper;
2024 
2025 SCTAB nTab;
2026 if (bSinglePageSheets)
>>> CID 1454848:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value from "nSelRenderer" to "nTab" here, but that stored 
>>> value is overwritten before it can be used.
2027 nTab = nSelRenderer;
2028 if ( !maValidPages.empty() )
2029 nTab = pPrintFuncCache->GetTabForPage( maValidPages.at( 
nRenderer )-1 );
2030 else
2031 nTab = pPrintFuncCache->GetTabForPage( nRenderer );
2032 

** CID 1454847:  Uninitialized members  (UNINIT_CTOR)
/sc/inc/interpretercontext.hxx: 67 in 
ScInterpreterContext::ScInterpreterContext(const ScDocument &, 
SvNumberFormatter *)()



*** CID 1454847:  Uninitialized members  (UNINIT_CTOR)
/sc/inc/interpretercontext.hxx: 67 in 
ScInterpreterContext::ScInterpreterContext(const ScDocument &, 
SvNumberFormatter *)()
61 , mnTokenCachePos(0)
62 , maTokens(TOKEN_CACHE_SIZE, nullptr)
63 , mScLookupCache(nullptr)
64 , pInterpreter(nullptr)
65 , mpFormatter(pFormatter)
66 {
>>> CID 1454847:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member field "maNFTypeCache.bIsValid" is not 
>>> initialized in this constructor nor in any functions that it calls.
67 }
68 
69 ScInterpreterContext() = delete;
70 
71 ~ScInterpreterContext();
72 

** CID 1454846:  Resource leaks  (RESOURCE_LEAK)
/desktop/source/lib/init.cxx: 3285 in 
doc_sendDialogEvent(_LibreOfficeKitDocument *, unsigned int, const char *)()



*** CID 1454846:  Resource leaks  (RESOURCE_LEAK)
/desktop/source/lib/init.cxx: 3285 in 
doc_sendDialogEvent(_LibreOfficeKitDocument *, unsigned int, const char *)()
3279 }
3280 
3281 char* pIdChar = strtok(pCopy, " ");
3282 
3283 if (!pIdChar) {
3284 SetLastExceptionMsg("Error parsing the command.");
>>> CID 1454846:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "pCopy" going out of scope leaks the storage it points to.
3285 return;
3286 }
3287 
3288 OUString sId = OUString::createFromAscii(pIdChar);
3289 free(pCopy);
3290 



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyrPkVZxE0q4RYCn-2B6gRt9wBjofytNk6R5Hl-2FXkRHdAjMUCYvstBk46CNVkiTHmpubzutGbNdLzIzz694DxRtUyEDHZnD6SQbZKKSARR6AUkJ1SpJSFn7zICFseLljhWtI-2BhDB8LcLf3nKa9BueQPGgslvjlk9s38JdvxAs3QJ8kk-3D


New Defects reported by Coverity Scan for LibreOffice

2019-10-05 Thread scan-admin
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.
2 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 1454634:  Error handling issues  (CHECKED_RETURN)
/vcl/source/app/salvtables.cxx: 1602 in 
SalInstanceAssistant::set_current_page(int)()



*** CID 1454634:  Error handling issues  (CHECKED_RETURN)
/vcl/source/app/salvtables.cxx: 1602 in 
SalInstanceAssistant::set_current_page(int)()
1596 if (aPageSize.Height() > aFinalSize.Height())
1597 aFinalSize.setHeight(aPageSize.Height());
1598 }
1599 m_xWizard->SetPageSizePixel(aFinalSize);
1600 }
1601 
>>> CID 1454634:  Error handling issues  (CHECKED_RETURN)
>>> Calling "ShowPage" without checking return value (as is done elsewhere 
>>> 4 out of 5 times).
1602 m_xWizard->ShowPage(m_aIds[nPage]);
1603 enable_notify_events();
1604 }
1605 
1606 virtual void set_current_page(const OString& rIdent) override
1607 {

** CID 1454633:  Error handling issues  (UNCAUGHT_EXCEPT)
/vcl/unx/generic/gdi/salgdi.cxx: 92 in X11SalGraphics::~X11SalGraphics()()



*** CID 1454633:  Error handling issues  (UNCAUGHT_EXCEPT)
/vcl/unx/generic/gdi/salgdi.cxx: 92 in X11SalGraphics::~X11SalGraphics()()
86 mxTextRenderImpl.reset(new X11CairoTextRender(*this));
87 mxImpl.reset(new X11SalGraphicsImpl(*this));
88 }
89 
90 }
91 
>>> CID 1454633:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the throw list "noexcept" doesn't allow it to be thrown. This will 
>>> cause a call to unexpected() which usually calls terminate().
92 X11SalGraphics::~X11SalGraphics()
93 {
94 DeInit();
95 ReleaseFonts();
96 freeResources();
97 }

** CID 1454632:  Error handling issues  (UNCAUGHT_EXCEPT)
/vcl/unx/generic/app/saldisp.cxx: 294 in SalDisplay::~SalDisplay()()



*** CID 1454632:  Error handling issues  (UNCAUGHT_EXCEPT)
/vcl/unx/generic/app/saldisp.cxx: 294 in SalDisplay::~SalDisplay()()
288 SAL_WARN_IF(  pData->GetDisplay(), "vcl", "Second SalDisplay 
created !!!" );
289 pData->SetDisplay( this );
290 
291 m_nXDefaultScreen = SalX11Screen( DefaultScreen( pDisp_ ) );
292 }
293 
>>> CID 1454632:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the throw list "noexcept" doesn't allow it to be thrown. This will 
>>> cause a call to unexpected() which usually calls terminate().
294 SalDisplay::~SalDisplay()
295 {
296 #if OSL_DEBUG_LEVEL > 1
297 fprintf( stderr, "SalDisplay::~SalDisplay()\n" );
298 #endif
299 if( pDisp_ )

** CID 1454631:  Control flow issues  (DEADCODE)
/basegfx/source/tools/systemdependentdata.cxx: 112 in 
basegfx::SystemDependentData::calculateCombinedHoldCyclesInSeconds() const()



*** CID 1454631:  Control flow issues  (DEADCODE)
/basegfx/source/tools/systemdependentdata.cxx: 112 in 
basegfx::SystemDependentData::calculateCombinedHoldCyclesInSeconds() const()
106 {
107 nResult = nSeconds;
108 }
109 }
110 
111 // set locally (once, on-demand created, non-zero)
>>> CID 1454631:  Control flow issues  (DEADCODE)
>>> Execution cannot reach the expression "1U" inside this statement: 
>>> "const_cast(this)->mnCalculatedCycles 
= nResult < 1 ? 1 : nResult;
113 }
114 
115 return mnCalculatedCycles;
116 }
117 

** CID 1454630:  Uninitialized members  (UNINIT_CTOR)
/sc/source/core/data/dpcache.cxx: 175 in ::Bucket::Bucket()()



*** CID 1454630:  Uninitialized members  (UNINIT_CTOR)
/sc/source/core/data/dpcache.cxx: 175 in ::Bucket::Bucket()()
169 
170 struct Bucket
171 {
172 ScDPItemData maValue;
173 SCROW mnOrderIndex;
174 SCROW mnDataIndex;
>>> CID 1454630:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mnDataIndex" is not initialized in this 
>>> constructor 

New Defects reported by Coverity Scan for LibreOffice

2019-09-26 Thread scan-admin
Hi,

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

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


** CID 1454003:(DEADCODE)
/libreofficekit/qa/tilebench/tilebench.cxx: 129 in dumpTile(const char *, int, 
int, int, const unsigned char *, int, int, int)()
/libreofficekit/qa/tilebench/tilebench.cxx: 96 in dumpTile(const char *, int, 
int, int, const unsigned char *, int, int, int)()
/libreofficekit/qa/tilebench/tilebench.cxx: 134 in dumpTile(const char *, int, 
int, int, const unsigned char *, int, int, int)()



*** CID 1454003:(DEADCODE)
/libreofficekit/qa/tilebench/tilebench.cxx: 129 in dumpTile(const char *, int, 
int, int, const unsigned char *, int, int, int)()
123 }
124 
125 ofs.write(buf, 3);
126 }
127 if (dumpText)
128 {
>>> CID 1454003:(DEADCODE)
>>> Execution cannot reach this statement: "lowResI = (pixel[0] + pixel...".
129 int lowResI = (pixel[0] + pixel[1] + pixel[2])/(3*16);
130 fprintf(stderr,"%1x", lowResI);
131 }
132 }
133 if (dumpText)
134 fprintf(stderr,"\n");
/libreofficekit/qa/tilebench/tilebench.cxx: 96 in dumpTile(const char *, int, 
int, int, const unsigned char *, int, int, int)()
90 << nHeight << "\n"
91 << 255 << "\n" ;
92 
93 bool dumpText = false;
94 
95 if (dumpText)
>>> CID 1454003:(DEADCODE)
>>> Execution cannot reach this statement: "fprintf(stderr, "Stream %s ...".
96 fprintf(stderr, "Stream %s - %dx%d:\n", pNameStem, nWidth, 
nHeight);
97 
98 for (int y = 0; y < nHeight; ++y)
99 {
100 const char* row = pBuffer + (y + nOffY) * nTotalWidth * 4 + 
nOffX * 4;
101 for (int x = 0; x < nWidth; ++x)
/libreofficekit/qa/tilebench/tilebench.cxx: 134 in dumpTile(const char *, int, 
int, int, const unsigned char *, int, int, int)()
128 {
129 int lowResI = (pixel[0] + pixel[1] + pixel[2])/(3*16);
130 fprintf(stderr,"%1x", lowResI);
131 }
132 }
133 if (dumpText)
>>> CID 1454003:(DEADCODE)
>>> Execution cannot reach this statement: "fprintf(stderr, "\n");".
134 fprintf(stderr,"\n");
135 }
136 ofs.close();
137 }
138 
139 static void testTile( Document *pDocument, int max_parts,

** CID 1454002:(FORWARD_NULL)



*** CID 1454002:(FORWARD_NULL)
/sc/source/ui/app/inputhdl.cxx: 3777 in ScInputHandler::NotifyChange(const 
ScInputHdlState *, bool, ScTabViewShell *, bool)()
3771 ScModule* pScMod = SC_MOD();
3772 
3773 ScTabViewShell* pScTabViewShell = pScMod ? 
dynamic_cast(pScMod->GetViewShell()) : nullptr;
3774 
3775 // Also take foreign reference input into account here (e.g. 
FunctionsAutoPilot),
3776 // FormEditData, if we're switching from Help to Calc:
>>> CID 1454002:(FORWARD_NULL)
>>> Passing null pointer "pScMod" to "IsFormulaMode", which dereferences it.
3777 if ( !bFormulaMode && !pScMod->IsFormulaMode() &&
3778  ( !pScTabViewShell || !pScTabViewShell->GetFormEditData() 
) )
3779 {
3780 bool bIgnore = false;
3781 if ( bModified )
3782 {
/sc/source/ui/app/inputhdl.cxx: 3900 in ScInputHandler::NotifyChange(const 
ScInputHdlState *, bool, ScTabViewShell *, bool)()
3894 }
3895 }
3896 
3897 if ( pInputWin)
3898 {
3899 // Do not enable if RefDialog is open
>>> CID 1454002:(FORWARD_NULL)
>>> Passing null pointer "pScMod" to "IsFormulaMode", which dereferences it.
3900 if(!pScMod->IsFormulaMode()&& !pScMod->IsRefDialogOpen())
3901 {
3902 if ( !pInputWin->IsEnabled())
3903 {
3904 pDelayTimer->Stop();
3905 pInputWin->Enable();

** CID 1454001:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1454001:  Null pointer dereferences  (FORWARD_NULL)
/vcl/unx/gtk3/gtk3gtkinst.cxx: 2746 in 
GtkInstanceContainer::CreateChildFrame()()
2740 // will create a toplevel GtkEventBox window
2741

New Defects reported by Coverity Scan for LibreOffice

2019-09-19 Thread scan-admin
Hi,

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

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


** CID 1453856:  Uninitialized members  (UNINIT_CTOR)
/dbaccess/source/ui/misc/WCopyTable.cxx: 581 in 
dbaui::OCopyTableWizard::OCopyTableWizard(weld::Window *, const rtl::OUString 
&, short, const dbaui::ICopyTableSourceObject &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &)()



*** CID 1453856:  Uninitialized members  (UNINIT_CTOR)
/dbaccess/source/ui/misc/WCopyTable.cxx: 581 in 
dbaui::OCopyTableWizard::OCopyTableWizard(weld::Window *, const rtl::OUString 
&, short, const dbaui::ICopyTableSourceObject &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &)()
575 AddWizardPage( VclPtr::Create(this, 
CreatePageContainer() ) );
576 AddWizardPage( VclPtr::Create(this, 
CreatePageContainer() ) );
577 AddWizardPage( VclPtr::Create(this, 
CreatePageContainer() ) );
578 ActivatePage();
579 
580 m_xAssistant->set_current_page(0);
>>> CID 1453856:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_bUseHeaderLine" is not initialized in this 
>>> constructor nor in any functions that it calls.
581 }
582 
583 TabPageParent OCopyTableWizard::CreatePageContainer()
584 {
585 OString sIdent(OString::number(m_nPageCount));
586 weld::Container* pPageContainer = m_xAssistant->append_page(sIdent);

** CID 1453855:  Uninitialized members  (UNINIT_CTOR)
/dbaccess/source/core/api/datasettings.cxx: 113 in 
dbaccess::ODataSettings_Base::ODataSettings_Base()()



*** CID 1453855:  Uninitialized members  (UNINIT_CTOR)
/dbaccess/source/core/api/datasettings.cxx: 113 in 
dbaccess::ODataSettings_Base::ODataSettings_Base()()
107 ODataSettings_Base::ODataSettings_Base()
108 :m_bApplyFilter(false)
109 ,m_aFont(::comphelper::getDefaultFont())
110 ,m_nFontEmphasis(css::awt::FontEmphasisMark::NONE)
111 ,m_nFontRelief(css::awt::FontRelief::NONE)
112 {
>>> CID 1453855:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_bAutoGrow" is not initialized in this 
>>> constructor nor in any functions that it calls.
113 }
114 
115 ODataSettings_Base::~ODataSettings_Base()
116 {
117 }
118 

** CID 1453854:  Security best practices violations  (TOCTOU)
/sal/osl/unx/file_misc.cxx: 626 in osl_replaceFile()



*** CID 1453854:  Security best practices violations  (TOCTOU)
/sal/osl/unx/file_misc.cxx: 626 in osl_replaceFile()
620 int nGid = -1;
621 char destPath[PATH_MAX];
622 oslFileError eRet = FileURLToPath(destPath, PATH_MAX, ustrDestURL);
623 if (eRet == osl_File_E_None)
624 {
625 struct stat aFileStat;
>>> CID 1453854:  Security best practices violations  (TOCTOU)
>>> Calling function "stat" to perform check on "destPath".
626 int nRet = stat(destPath, );
627 if (nRet == -1)
628 {
629 nRet = errno;
630 SAL_INFO("sal.file", "stat(" << destPath << "): " << 
UnixErrnoString(nRet));
631 }



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyPNJyfhUqiM0KfhgD9GjvXJWjY2GyplQm3Q1R-2FMbRibDlmTUYIt0nZtt-2BL4nRGyydsuBJMojMUaywHrhfrKa32IT7mCLypB9gyK3n-2BZiHarAcuFS1WiKfI0pWRsogp6QgM-2FjcMabV4xCjGgpbmREKfuRVaNrvjqTVcihG55MyvMc-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-09-05 Thread scan-admin
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.
3 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 4 of 4 defect(s)


** CID 1453562:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/misc/WCopyTable.cxx: 1217 in 
dbaui::OCopyTableWizard::createTable()()



*** CID 1453562:  Error handling issues  (CHECKED_RETURN)
/dbaccess/source/ui/misc/WCopyTable.cxx: 1217 in 
dbaui::OCopyTableWizard::createTable()()
1211 sSchema = xMetaData->getUserName();
1212 // In case of mysql it is not that simple
1213 if(xMetaData->getDatabaseProductName() == "MySQL")
1214 {
1215 Reference< XStatement > xSelect = 
m_xDestConnection->createStatement();
1216 Reference< XResultSet > xRs = 
xSelect->executeQuery("select database()");
>>> CID 1453562:  Error handling issues  (CHECKED_RETURN)
>>> Calling "next" without checking return value (as is done elsewhere 185 
>>> out of 193 times).
1217 xRs->next(); // first and only result
1218 Reference< XRow > xRow( xRs, UNO_QUERY_THROW );
1219 sSchema = xRow->getString(1);
1220 }
1221 }
1222 

** CID 1453561:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1453561:  Null pointer dereferences  (FORWARD_NULL)
/svx/source/svdraw/svdmrkv.cxx: 830 in SdrMarkView::SetMarkHandles(SfxViewShell 
*)()
824 bool bTableSelection = false;
825 bool bCellsAreSelected = false;
826 
827 if (mpMarkedObj && mpMarkedObj->GetObjIdentifier() == 
OBJ_TABLE)
828 {
829 auto* pTableObject = 
dynamic_cast(mpMarkedObj);
>>> CID 1453561:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pTableObject" to "createTableEdgesJson", which 
>>> dereferences it.
830 bTableSelection = 
pTableObject->createTableEdgesJson(aTableJsonTree);
831 
832 rtl::Reference xController = 
static_cast(this)->getSelectionController();
833 if (xController.is() && xController->hasSelectedCells())
834 {
835 // The table shape has selected cells, which 
provide text selection already -> no graphic selection.

** CID 1453560:  Error handling issues  (CHECKED_RETURN)
/connectivity/source/drivers/firebird/DatabaseMetaData.cxx: 604 in 
connectivity::firebird::ODatabaseMetaData::getDatabaseProductVersion()()



*** CID 1453560:  Error handling issues  (CHECKED_RETURN)
/connectivity/source/drivers/firebird/DatabaseMetaData.cxx: 604 in 
connectivity::firebird::ODatabaseMetaData::getDatabaseProductVersion()()
598 
599 OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion(  )
600 {
601 uno::Reference< XStatement > xSelect = 
m_pConnection->createStatement();
602 
603 uno::Reference< XResultSet > xRs = xSelect->executeQuery("SELECT 
rdb$get_context('SYSTEM', 'ENGINE_VERSION') as version from rdb$database");
>>> CID 1453560:  Error handling issues  (CHECKED_RETURN)
>>> Calling "next" without checking return value (as is done elsewhere 185 
>>> out of 193 times).
604 xRs->next(); // first and only row
605 uno::Reference< XRow > xRow( xRs, UNO_QUERY_THROW );
606 return xRow->getString(1);
607 }
608 
609 OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName(  )

** CID 1453559:  Error handling issues  (CHECKED_RETURN)
/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx: 367 in 
connectivity::mysqlc::ODatabaseMetaData::getUserName()()



*** CID 1453559:  Error handling issues  (CHECKED_RETURN)
/connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx: 367 in 
connectivity::mysqlc::ODatabaseMetaData::getUserName()()
361 
362 OUString SAL_CALL ODatabaseMetaData::getUserName()
363 {
364 Reference statement = m_rConnection.createStatement();
365 Reference rs = statement->executeQuery("select user()");
366 Reference xRow(rs, UNO_QUERY_THROW);
>>> CID 1453559:  Error handling issues  (CHECKED_RETURN)
>>> Calling "next" without checking return value (as is done elsewhere 185 
>>> out of 193 times).
367 rs->next(); // the first and 

New Defects reported by Coverity Scan for LibreOffice

2019-08-24 Thread scan-admin
Hi,

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

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


** CID 1452763:  Error handling issues  (CHECKED_RETURN)
/xmloff/source/draw/QRCodeContext.cxx: 81 in 
QRCodeContext::QRCodeContext(SvXMLImport &, unsigned short, const rtl::OUString 
&, const 
com::sun::star::uno::Reference &, 
const com::sun::star::uno::Reference &)()



*** CID 1452763:  Error handling issues  (CHECKED_RETURN)
/xmloff/source/draw/QRCodeContext.cxx: 81 in 
QRCodeContext::QRCodeContext(SvXMLImport &, unsigned short, const rtl::OUString 
&, const 
com::sun::star::uno::Reference &, 
const com::sun::star::uno::Reference &)()
75 else
76 aQRCode.ErrorCorrection = 
css::drawing::QRCodeErrorCorrection::HIGH;
77 }
78 
79 if (IsXMLToken(aLocalName, XML_QRCODE_BORDER))
80 {
>>> CID 1452763:  Error handling issues  (CHECKED_RETURN)
>>> Calling "convertNumber" without checking return value (as is done 
>>> elsewhere 23 out of 24 times).
81 sax::Converter::convertNumber(aQRCode.Border, 
sValue, 0);
82 }
83 break;
84 
85 case XML_NAMESPACE_OFFICE:
86 if (IsXMLToken(aLocalName, XML_STRING_VALUE))

** CID 1452762:  Uninitialized members  (UNINIT_CTOR)
/sw/source/ui/dbui/mmgreetingspage.hxx: 74 in 
SwGreetingsHandler::SwGreetingsHandler(SwMailMergeConfigItem &, weld::Builder 
&)()



*** CID 1452762:  Uninitialized members  (UNINIT_CTOR)
/sw/source/ui/dbui/mmgreetingspage.hxx: 74 in 
SwGreetingsHandler::SwGreetingsHandler(SwMailMergeConfigItem &, weld::Builder 
&)()
68 , m_xFemaleColumnLB(rBuilder.weld_combo_box("femalecol"))
69 , m_xFemaleFieldFT(rBuilder.weld_label("femalefieldft"))
70 , m_xFemaleFieldCB(rBuilder.weld_combo_box("femalefield"))
71 , m_xNeutralFT(rBuilder.weld_label("generalft"))
72 , m_xNeutralCB(rBuilder.weld_combo_box("general"))
73 {
>>> CID 1452762:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_pWizard" is not initialized in this 
>>> constructor nor in any functions that it calls.
74 }
75 
76 ~SwGreetingsHandler() {}
77 
78 DECL_LINK(IndividualHdl_Impl, weld::ToggleButton&, void);
79 DECL_LINK(GreetingHdl_Impl, weld::Button&, void);

** CID 1452761:  Error handling issues  (UNCAUGHT_EXCEPT)
/editeng/source/items/frmitems.cxx: 2822 in 
SvxBrushItem::SvxBrushItem(SvxBrushItem&&)()



*** CID 1452761:  Error handling issues  (UNCAUGHT_EXCEPT)
/editeng/source/items/frmitems.cxx: 2822 in 
SvxBrushItem::SvxBrushItem(SvxBrushItem&&)()
2816 , maStrFilter(rItem.maStrFilter)
2817 , eGraphicPos(rItem.eGraphicPos)
2818 , bLoadAgain(rItem.bLoadAgain)
2819 {
2820 }
2821 
>>> CID 1452761:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the throw list "noexcept" doesn't allow it to be thrown. This will 
>>> cause a call to unexpected() which usually calls terminate().
2822 SvxBrushItem::SvxBrushItem(SvxBrushItem&& rItem) noexcept
2823 : SfxPoolItem(std::move(rItem))
2824 , aColor(std::move(rItem.aColor))
2825 , nShadingValue(std::move(rItem.nShadingValue))
2826 , xGraphicObject(std::move(rItem.xGraphicObject))
2827 , nGraphicTransparency(std::move(rItem.nGraphicTransparency))



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy2sHx8n-2FGX94VL835wOQ4iXa90iBbtj8dxlQaQuXx7jFG2zF82eaaRN54vdmvMKN4AdOE3m2HzN7-2BZ9y6Lnww68qPo9GSYKXVxUsLyCgxMl9T9coj-2FP7GltzT9f-2Fq772ElHa6Bt7W5gN1B8znwJFBXKykGtMD-2F14ecD0lwWqwBTs-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-08-20 Thread scan-admin
Hi,

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

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


** CID 1452395:  API usage errors  (INVALIDATE_ITERATOR)
/vcl/source/uitest/logger.cxx: 352 in ::GetKeyInMapWithIndex(const 
std::map, 
std::allocator>> &, int)()



*** CID 1452395:  API usage errors  (INVALIDATE_ITERATOR)
/vcl/source/uitest/logger.cxx: 352 in ::GetKeyInMapWithIndex(const 
std::map, 
std::allocator>> &, int)()
346 
347 std::map::const_iterator itr = 
rParameters.begin();
348 
349 for (; itr != rParameters.end() && j < index; ++itr, ++j)
350 ;
351 
>>> CID 1452395:  API usage errors  (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "itr" though it is already past the end of its 
>>> container.
352 return itr->first;
353 }
354 }
355 
356 void UITestLogger::logEvent(const EventDescription& rDescription)
357 {

** CID 1452394:  API usage errors  (INVALIDATE_ITERATOR)
/vcl/source/uitest/logger.cxx: 340 in ::GetValueInMapWithIndex(const 
std::map, 
std::allocator>> &, int)()



*** CID 1452394:  API usage errors  (INVALIDATE_ITERATOR)
/vcl/source/uitest/logger.cxx: 340 in ::GetValueInMapWithIndex(const 
std::map, 
std::allocator>> &, int)()
334 
335 std::map::const_iterator itr = 
rParameters.begin();
336 
337 for (; itr != rParameters.end() && j < index; ++itr, ++j)
338 ;
339 
>>> CID 1452394:  API usage errors  (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "itr" though it is already past the end of its 
>>> container.
340 return itr->second;
341 }
342 
343 OUString GetKeyInMapWithIndex(const std::map& 
rParameters, sal_Int32 index)
344 {
345 sal_Int32 j = 0;

** CID 1452393:(INVALIDATE_ITERATOR)
/sc/source/core/data/dpoutput.cxx: 1178 in 
ScDPOutput::GetMemberResultNames(std::unordered_set, std::equal_to, 
std::allocator> &, long)()
/sc/source/core/data/dpoutput.cxx: 1178 in 
ScDPOutput::GetMemberResultNames(std::unordered_set, std::equal_to, 
std::allocator> &, long)()



*** CID 1452393:(INVALIDATE_ITERATOR)
/sc/source/core/data/dpoutput.cxx: 1178 in 
ScDPOutput::GetMemberResultNames(std::unordered_set, std::equal_to, 
std::allocator> &, long)()
1172 }
1173 
1174 // collect the member names
1175 
1176 if ( bFound )
1177 {
>>> CID 1452393:(INVALIDATE_ITERATOR)
>>> Dereferencing iterator "it" though it is already past the end of its 
>>> container.
1178 const uno::Sequence aMemberResults = 
it->maResult;
1179 for (const sheet::MemberResult& rMemberResult : aMemberResults)
1180 {
1181 if ( rMemberResult.Flags & 
sheet::MemberResultFlags::HASMEMBER )
1182 rNames.insert(rMemberResult.Name);
1183 }
/sc/source/core/data/dpoutput.cxx: 1178 in 
ScDPOutput::GetMemberResultNames(std::unordered_set, std::equal_to, 
std::allocator> &, long)()
1172 }
1173 
1174 // collect the member names
1175 
1176 if ( bFound )
1177 {
>>> CID 1452393:(INVALIDATE_ITERATOR)
>>> Dereferencing iterator "it" though it is already past the end of its 
>>> container.
1178 const uno::Sequence aMemberResults = 
it->maResult;
1179 for (const sheet::MemberResult& rMemberResult : aMemberResults)
1180 {
1181 if ( rMemberResult.Flags & 
sheet::MemberResultFlags::HASMEMBER )
1182 rNames.insert(rMemberResult.Name);
1183 }



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpydN1LOlpVCvYEuj-2BPLWY9abIX-2FyCec9UuTsK-2BfR9pq7EFfwJps0ZlaR8rcaIyfWkFfI4LZUqzcwQF7kJAmTgMu54DdkXHFJaeVouFcA5G1wavBru1P4TO2vyARVjWVRjF4rfqqHunOOHdB5FszraR1ZLyxh9g-2FsKp53pmj1q4pm0-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-08-09 Thread scan-admin
Hi,

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

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


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


** CID 1452268:  Uninitialized variables  (UNINIT)
/sal/osl/all/log.cxx: 223 in 
::maybeOutputTimestamp(std::__cxx11::basic_ostringstream, std::allocator> &)()



*** CID 1452268:  Uninitialized variables  (UNINIT)
/sal/osl/all/log.cxx: 223 in 
::maybeOutputTimestamp(std::__cxx11::basic_ostringstream, std::allocator> &)()
217 tm.tm_sec = dateTime.Seconds;
218 tm.tm_min = dateTime.Minutes;
219 tm.tm_hour = dateTime.Hours;
220 tm.tm_mday = dateTime.Day;
221 tm.tm_mon = dateTime.Month - 1;
222 tm.tm_year = dateTime.Year - 1900;
>>> CID 1452268:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "tm.tm_yday" when calling "strftime".
223 strftime(ts, sizeof(ts), "%Y-%m-%d:%H:%M:%S", );
224 char milliSecs[11];
225 snprintf(milliSecs, sizeof(milliSecs), "%03u",
226  static_cast(dateTime.NanoSeconds / 100));
227 s << ts << '.' << milliSecs << ':';
228 }



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyYGtrkcmWaBmi4xMdiWjSL9kYLAP2r6yQ1CFC2IEo8KUzH9YVActk0P0yFYi0pBBMFJmFQOpQib3tA3wLlm5QoLR3AFIu5KMUNWjwRs-2FlEaTzYvdT7M21WjfpNzv2wWN1iIqxT51c782MJhAsaQg6L-2BpWUEsSXy3swqIS73yy8L4-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-07-25 Thread scan-admin
Hi,

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

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


** CID 1452040:  Error handling issues  (CHECKED_RETURN)
/xmloff/source/text/txtfldi.cxx: 3475 in 
XMLAnnotationImportContext::PrepareField(const 
com::sun::star::uno::Reference &)()



*** CID 1452040:  Error handling issues  (CHECKED_RETURN)
/xmloff/source/text/txtfldi.cxx: 3475 in 
XMLAnnotationImportContext::PrepareField(const 
com::sun::star::uno::Reference &)()
3469 // import (possibly empty) initials
3470 OUString sInitials( aInitialsBuffer.makeStringAndClear() );
3471 xPropertySet->setPropertyValue("Initials", makeAny(sInitials));
3472 
3473 //import resolved flag
3474 bool bTmp(false);
>>> CID 1452040:  Error handling issues  (CHECKED_RETURN)
>>> Calling "convertBool" without checking return value (as is done 
>>> elsewhere 73 out of 79 times).
3475 ::sax::Converter::convertBool(bTmp, aResolved);
3476 xPropertySet->setPropertyValue("Resolved", makeAny(bTmp));
3477 
3478 util::DateTime aDateTime;
3479 if (::sax::Converter::parseDateTime(aDateTime,
3480 
aDateBuffer.makeStringAndClear()))



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyG0HHZhxNA2-2FRDcxiubLh1mL52tzYJxLZcxD76DXXa8Quj-2F7iOVFX29AUPRp-2FztqbCl-2BrwURdaa7DAmJDf3cCizIlw8KaMf2g3q1VtTPRwJ4xCovkyzEek97e-2BjbA1wohTQvdnEPURchWagUXZd0J9ovfqp-2BZO9C11r1Chh9LZjg-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-07-23 Thread scan-admin
Hi,

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

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


** CID 1452004:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1452004:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/app/docstyle.cxx: 465 in 
SwDocStyleSheet::SwDocStyleSheet(SwDoc &, SwDocStyleSheetPool &)()
459 pFrameFormat(nullptr),
460 pDesc(nullptr),
461 pNumRule(nullptr),
462 pTableFormat(nullptr),
463 pBoxFormat(nullptr),
464 rDoc(rDocument),
>>> CID 1452004:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "this->GetPool()" to "GetPool", which dereferences 
>>> it.
465 aCoreSet(
466 GetPool()->GetPool(),
467 svl::Items<
468 RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
469 RES_PARATR_BEGIN, RES_FRMATR_END - 1,
470 RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1,



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB73RtgzoPcQtNNP5dkHLuV1E-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy9cIYTntn8C-2FB5AiVSxQbRHsHb6tT0TSQvxGGaHoF6lvP01J9hBlZdQYdt92wZXDWlirYkNBH05br4KWWonqqkSb2BdeaQCaPw0LgHJi3jg7-2Fx24tMyjN933UuSOMZLC2nfhSiHmbXc46Ja4-2BMIyf5WcGMsx4cDTpp-2B612ecLWXc-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

New Defects reported by Coverity Scan for LibreOffice

2019-07-17 Thread scan-admin
Hi,

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

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


** CID 1451643:  Uninitialized members  (UNINIT_CTOR)
/cui/source/dialogs/SpellDialog.cxx: 1117 in 
svx::SentenceEditWindow_Impl::SentenceEditWindow_Impl()()



*** CID 1451643:  Uninitialized members  (UNINIT_CTOR)
/cui/source/dialogs/SpellDialog.cxx: 1117 in 
svx::SentenceEditWindow_Impl::SentenceEditWindow_Impl()()
 
1112 SentenceEditWindow_Impl::SentenceEditWindow_Impl()
1113 : m_nErrorStart(0)
1114 , m_nErrorEnd(0)
1115 , m_bIsUndoEditMode(false)
1116 {
>>> CID 1451643:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_pToolbar" is not initialized in this 
>>> constructor nor in any functions that it calls.
1117 }
1118 
1119 void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* 
pDrawingArea)
1120 {
1121 Size aSize(pDrawingArea->get_approximate_digit_width() * 60,
1122pDrawingArea->get_text_height() * 6);

** CID 1451642:  Integer handling issues  (DIVIDE_BY_ZERO)



*** CID 1451642:  Integer handling issues  (DIVIDE_BY_ZERO)
/sd/source/ui/unoidl/UnoDocumentSettings.cxx: 706 in 
sd::DocumentSettings::_setPropertyValues(const comphelper::PropertyMapEntry **, 
const com::sun::star::uno::Any *)()
700 case HANDLE_SCALE_DOM:
701 {
702 sal_Int32 nValue = 0;
703 if( *pValues >>= nValue )
704 {
705 Fraction aFract( 
pDoc->GetUIScale().GetNumerator(), nValue );
>>> CID 1451642:  Integer handling issues  (DIVIDE_BY_ZERO)
>>> In function call "SetUIScale", modulo by expression 
>>> "aFract.mnNumerator" which may be zero has undefined behavior.
706 pDoc->SetUIScale( aFract );
707 bOk = true;
708 bChanged = true;
709 }
710 }
711 break;

** CID 1451641:  Error handling issues  (CHECKED_RETURN)
/vcl/source/gdi/virdev.cxx: 482 in 
VirtualDevice::ImplSetReferenceDevice(VirtualDevice::RefDevMode, int, int)()



*** CID 1451641:  Error handling issues  (CHECKED_RETURN)
/vcl/source/gdi/virdev.cxx: 482 in 
VirtualDevice::ImplSetReferenceDevice(VirtualDevice::RefDevMode, int, int)()
476 // preserve global font lists
477 ImplSVData* pSVData = ImplGetSVData();
478 mxFontCollection.reset();
479 mxFontCache.reset();
480 
481 // get font list with scalable fonts only
>>> CID 1451641:  Error handling issues  (CHECKED_RETURN)
>>> Calling "AcquireGraphics" without checking return value (as is done 
>>> elsewhere 4 out of 5 times).
482 AcquireGraphics();
483 mxFontCollection = pSVData->maGDIData.mxScreenFontList->Clone();
484 
485 // prepare to use new font lists
486 mxFontCache.reset(new ImplFontCache);
487 }

** CID 1451640:(DIVIDE_BY_ZERO)
/chart2/source/controller/main/PositionAndSizeHelper.cxx: 91 in 
chart::PositionAndSizeHelper::moveObject(chart::ObjectType, const 
com::sun::star::uno::Reference &, const 
com::sun::star::awt::Rectangle &, const com::sun::star::awt::Rectangle &)()
/chart2/source/controller/main/PositionAndSizeHelper.cxx: 80 in 
chart::PositionAndSizeHelper::moveObject(chart::ObjectType, const 
com::sun::star::uno::Reference &, const 
com::sun::star::awt::Rectangle &, const com::sun::star::awt::Rectangle &)()
/chart2/source/controller/main/PositionAndSizeHelper.cxx: 55 in 
chart::PositionAndSizeHelper::moveObject(chart::ObjectType, const 
com::sun::star::uno::Reference &, const 
com::sun::star::awt::Rectangle &, const com::sun::star::awt::Rectangle &)()
/chart2/source/controller/main/PositionAndSizeHelper.cxx: 66 in 
chart::PositionAndSizeHelper::moveObject(chart::ObjectType, const 
com::sun::star::uno::Reference &, const 
com::sun::star::awt::Rectangle &, const com::sun::star::awt::Rectangle &)()
/chart2/source/controller/main/PositionAndSizeHelper.cxx: 117 in 
chart::PositionAndSizeHelper::moveObject(chart::ObjectType, const 
com::sun::star::uno::Reference &, const 
com::sun::star::awt::Rectangle &, const com::sun::star::awt::Rectangle &)()
/chart2/source/controller/main/PositionAndSizeHelper.cxx: 109 in 

New Defects reported by Coverity Scan for LibreOffice

2019-07-01 Thread scan-admin
Hi,

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

261 new defect(s) introduced to LibreOffice found with Coverity Scan.
49 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 261 defect(s)


** CID 1448549:  Memory - illegal accesses  (USE_AFTER_FREE)



*** CID 1448549:  Memory - illegal accesses  (USE_AFTER_FREE)
/sw/source/core/layout/flylay.cxx: 688 in SwFlyFreeFrame::CheckClip(const 
SwFormatFrameSize &)()
682 
pLow->Calc(getRootFrame()->GetCurrShell()->GetOut());
683 // also calculate the (Column)BodyFrame
684 
static_cast(pLow)->Lower()->Calc(getRootFrame()->GetCurrShell()->GetOut());
685 pLow = pLow->GetNext();
686 } while ( pLow );
687 ::CalcContent( this );
>>> CID 1448549:  Memory - illegal accesses  (USE_AFTER_FREE)
>>> Calling "ColUnlock" dereferences freed pointer "this".
688 ColUnlock();
689 
690 if ( !isFrameAreaSizeValid() && !m_bWidthClipped )
691 {
692 setFrameAreaSizeValid(true);
693 m_bFormatHeightOnly = true;

** CID 1448548:  Memory - corruptions  (OVERLAPPING_COPY)
/unoidl/source/sourceprovider-parser.y: 242 in ::coerce(int, void *, 
unoidl::detail::SourceProviderExpr *, unoidl::detail::SourceProviderExpr *)()



*** CID 1448548:  Memory - corruptions  (OVERLAPPING_COPY)
/unoidl/source/sourceprovider-parser.y: 242 in ::coerce(int, void *, 
unoidl::detail::SourceProviderExpr *, unoidl::detail::SourceProviderExpr *)()
236 case unoidl::detail::SourceProviderExpr::TYPE_FLOAT:
237 switch (rhs->type) {
238 case unoidl::detail::SourceProviderExpr::TYPE_BOOL:
239 ok = false;
240 break;
241 case unoidl::detail::SourceProviderExpr::TYPE_INT:
>>> CID 1448548:  Memory - corruptions  (OVERLAPPING_COPY)
>>> Assigning "(*rhs).ival" to "(*rhs).fval", which have overlapping memory 
>>> locations and different types.
242 rhs->fval = rhs->ival;
243 ok = true;
244 break;
245 case unoidl::detail::SourceProviderExpr::TYPE_UINT:
246 rhs->fval = rhs->uval;
247 ok = true;

** CID 1448547:  Error handling issues  (CHECKED_RETURN)
/basic/source/runtime/methods.cxx: 782 in SbRtl_FileLen(StarBASIC *, SbxArray 
&, bool)()



*** CID 1448547:  Error handling issues  (CHECKED_RETURN)
/basic/source/runtime/methods.cxx: 782 in SbRtl_FileLen(StarBASIC *, SbxArray 
&, bool)()
776 }
777 else
778 {
779 DirectoryItem aItem;
780 DirectoryItem::get( getFullPath( aStr ), aItem );
781 FileStatus aFileStatus( osl_FileStatus_Mask_FileSize );
>>> CID 1448547:  Error handling issues  (CHECKED_RETURN)
>>> Calling "getFileStatus" without checking return value (as is done 
>>> elsewhere 76 out of 88 times).
782 aItem.getFileStatus( aFileStatus );
783 nLen = static_cast(aFileStatus.getFileSize());
784 }
785 rPar.Get(0)->PutLong( static_cast(nLen) );
786 }
787 }

** CID 1448546:  Control flow issues  (DEADCODE)
/opencl/opencltest/main.cxx: 126 in runTest(const char *, const char *)()



*** CID 1448546:  Control flow issues  (DEADCODE)
/opencl/opencltest/main.cxx: 126 in runTest(const char *, const char *)()
120 status = clGetProgramBuildInfo(program, deviceId, 
CL_PROGRAM_BUILD_LOG, length,
121error.data(), nullptr);
122 error[length] = '\0';
123 cerr << "OpenCL driver check build error:" << error.data() << 
endl;
124 abort();
125 #else
>>> CID 1448546:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: ";".
126 openclcheck(state);
127 #endif
128 }
129 cl_kernel kernel = clCreateKernel(program, "testFunction", );
130 openclcheck(state);
131 

** CID 1448545:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/svx/source/gallery2/gallery1.cxx: 726 in Gallery::ImplGetCachedTheme(const 
GalleryThemeEntry *)()




New Defects reported by Coverity Scan for LibreOffice

2018-11-26 Thread scan-admin
Hi,

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

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


** CID 1441522:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1441522:  Null pointer dereferences  (FORWARD_NULL)
/svx/source/tbxctrls/fontworkgallery.cxx: 200 in 
svx::FontWorkGalleryDialog::insertSelectedFontwork()()
194 // the mpSdrView that is used to insert 
(InsertObjectAtView below) the
195 // cloned SdrObject.
196 const bool bUseSpecialCalcMode(nullptr != mppSdrObject 
&& nullptr != mpDestModel);
197 const bool bSdrViewInsertMode(nullptr != mpSdrView);
198 
199 // center shape on current view
>>> CID 1441522:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "this->mpSdrView" to "GetFirstOutputDevice", which 
>>> dereferences it.
200 OutputDevice* 
pOutDev(mpSdrView->GetFirstOutputDevice());
201 
202 if(pOutDev && (bUseSpecialCalcMode || 
bSdrViewInsertMode))
203 {
204 // Clone directly to target SdrModel (may be 
different due to user/caller (!))
205 SdrObject* pNewObject(

** CID 1441521:  API usage errors  (INVALIDATE_ITERATOR)
/svl/source/passwordcontainer/passwordcontainer.cxx: 1280 in 
PasswordContainer::Notify()()



*** CID 1441521:  API usage errors  (INVALIDATE_ITERATOR)
/svl/source/passwordcontainer/passwordcontainer.cxx: 1280 in 
PasswordContainer::Notify()()
1274 if ( m_pStorageFile )
1275 m_pStorageFile->remove( rEntry.first, 
aNPIter->GetUserName() ); // remove record ( aURL, aName )
1276 }
1277 
1278 if( !aNPIter->HasPasswords( MEMORY_RECORD ) )
1279 {
>>> CID 1441521:  API usage errors  (INVALIDATE_ITERATOR)
>>> Using invalid iterator "std::vector>> std::allocator >::const_iterator(aNPIter)".
1280 aNPIter = rEntry.second.erase(aNPIter);
1281 }
1282 else
1283 ++aNPIter;
1284 }
1285 }



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyPvqYm7xQDzkVodLK1TcrkXKPdOyH620dN1PXJe81RVARFJDDBwCZPHg2q9rcCOCHpXWKxzCyug927WQjrLSJJytBCqRmTrMIfQKTNV-2BBcS5H990Z2VWkX58BzNNDQt4CB9eHPXssxwal2n7qxz-2BzDMYCO9SE82lnxETmLr-2FLiuA-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2018-11-22 Thread scan-admin
Hi,

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

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


** CID 1441484:  Control flow issues  (DEADCODE)
/sw/source/ui/chrdlg/swuiccoll.cxx: 247 in SwCondCollPage::SelectHdl(const 
weld::Widget *)()



*** CID 1441484:  Control flow issues  (DEADCODE)
/sw/source/ui/chrdlg/swuiccoll.cxx: 247 in SwCondCollPage::SelectHdl(const 
weld::Widget *)()
241 m_xStyleLB->append_text(pBase->GetName());
242 bEmpty = false;
243 }
244 pBase = pPool->Next();
245 }
246 if (!bEmpty)
>>> CID 1441484:  Control flow issues  (DEADCODE)
>>> Execution cannot reach the expression "-1" inside this statement: 
>>> "this->m_xStyleLB->select((b...".
247 m_xStyleLB->select(bEmpty ? -1 : 0);
248 SelectHdl(m_xStyleLB.get());
249 }
250 else
251 {
252 int nSelected = m_xTbLinks->get_selected_index();

** CID 1441483:  API usage errors  (INVALIDATE_ITERATOR)
/svx/source/accessibility/ChildrenManagerImpl.cxx: 745 in 
accessibility::ChildrenManagerImpl::ReplaceChild(accessibility::AccessibleShape 
*, const com::sun::star::uno::Reference &, 
long, const accessibility::AccessibleShapeTreeInfo &)()



*** CID 1441483:  API usage errors  (INVALIDATE_ITERATOR)
/svx/source/accessibility/ChildrenManagerImpl.cxx: 745 in 
accessibility::ChildrenManagerImpl::ReplaceChild(accessibility::AccessibleShape 
*, const com::sun::star::uno::Reference &, 
long, const accessibility::AccessibleShapeTreeInfo &)()
739 
740 bool bResult = I != maVisibleChildren.end();
741 if (bResult)
742 {
743 // Dispose the current child and send an event about its 
deletion.
744 pCurrentChild->dispose();
>>> CID 1441483:  API usage errors  (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "I" though it is already past the end of its 
>>> container.
745 mrContext.CommitChange (
746 AccessibleEventId::CHILD,
747 uno::Any(),
748 uno::makeAny (I->mxAccessibleShape));
749 
750 // Replace with replacement and send an event about existence



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyqUcLQTB-2FWiMN37Dhqh8FvKyo3BiWom4o0RgySJTcDOecT17spWWE6qA3Uk5e-2FZdQHsejmheBSSZkpIfUtg-2F-2FoRo2bQ8Bpz3bOQ1oeKzvlAYRaz3TyLyvHTeQ9mERYBSrvooFasy-2FRyFixxBxjZXy0ePyjeGH3ASyWSu40StJVH4-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2018-11-20 Thread scan-admin
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.
4 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 5 of 5 defect(s)


** CID 1441470:  Uninitialized members  (UNINIT_CTOR)
/vcl/unx/gtk3/gtk3gtkinst.cxx: 4133 in 
GtkInstanceTreeIter::GtkInstanceTreeIter(const GtkInstanceTreeIter*)()



*** CID 1441470:  Uninitialized members  (UNINIT_CTOR)
/vcl/unx/gtk3/gtk3gtkinst.cxx: 4133 in 
GtkInstanceTreeIter::GtkInstanceTreeIter(const GtkInstanceTreeIter*)()
4127 
4128 struct GtkInstanceTreeIter : public weld::TreeIter
4129 {
4130 GtkInstanceTreeIter(const GtkInstanceTreeIter* pOrig)
4131 {
4132 if (!pOrig)
>>> CID 1441470:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member field "iter.user_data3" is not initialized in 
>>> this constructor nor in any functions that it calls.
4133 return;
4134 iter = pOrig->iter;
4135 }
4136 GtkTreeIter iter;
4137 };
4138 

** CID 1441469:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1441469:  Null pointer dereferences  (NULL_RETURNS)
/vcl/source/app/salvtables.cxx: 2165 in 
SalInstanceTreeView::ExpandingHdl(SvTreeListBox *)()
2159 bool bPlaceHolder = false;
2160 if (pEntry->HasChildren())
2161 {
2162 auto pChild = m_xTreeView->FirstChild(pEntry);
2163 if (m_xTreeView->GetEntryText(pChild) == "")
2164 {
>>> CID 1441469:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be null "pChild" when calling 
>>> "RemoveEntry".
2165 m_xTreeView->RemoveEntry(pChild);
2166 bPlaceHolder = true;
2167 }
2168 }
2169 
2170 SalInstanceTreeIter aIter(nullptr);

** CID 1441468:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/app/salvtables.cxx: 1758 in 
SalInstanceTreeIter::SalInstanceTreeIter(const SalInstanceTreeIter*)()



*** CID 1441468:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/app/salvtables.cxx: 1758 in 
SalInstanceTreeIter::SalInstanceTreeIter(const SalInstanceTreeIter*)()
1752 
1753 struct SalInstanceTreeIter : public weld::TreeIter
1754 {
1755 SalInstanceTreeIter(const SalInstanceTreeIter* pOrig)
1756 {
1757 if (!pOrig)
>>> CID 1441468:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "iter" is not initialized in this constructor 
>>> nor in any functions that it calls.
1758 return;
1759 iter = pOrig->iter;
1760 }
1761 SvTreeListEntry* iter;
1762 };
1763 

** CID 1441467:  Error handling issues  (CHECKED_RETURN)
/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx: 1236 in 
SalGtkFilePicker::HandleGetListValue(_GtkComboBox *, short)()



*** CID 1441467:  Error handling issues  (CHECKED_RETURN)
/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx: 1236 in 
SalGtkFilePicker::HandleGetListValue(_GtkComboBox *, short)()
1230 {
1231 gchar *item;
1232 
gtk_tree_model_get(gtk_combo_box_get_model(pWidget),
1233 , 0, , -1);
1234 aItemList[i] = OUString(item, strlen(item), 
RTL_TEXTENCODING_UTF8);
1235 g_free(item);
>>> CID 1441467:  Error handling issues  (CHECKED_RETURN)
>>> Calling "gtk_tree_model_iter_next" without checking return value (as is 
>>> done elsewhere 4 out of 5 times).
1236 gtk_tree_model_iter_next(pTree, );
1237 }
1238 }
1239 aAny <<= aItemList;
1240 }
1241 break;

** CID 1441466:(TAINTED_SCALAR)
/filter/source/graphicfilter/ipict/ipict.cxx: 1095 in 
PictReader::ReadPixMapEtc(BitmapEx &, bool, bool, tools::Rectangle *, 
tools::Rectangle *, bool, bool)()
/filter/source/graphicfilter/ipict/ipict.cxx: 1126 in 
PictReader::ReadPixMapEtc(BitmapEx &, bool, bool, tools::Rectangle *, 
tools::Rectangle *, bool, bool)()



*** CID 1441466:(TAINTED_SCALAR)
/filter/source/graphicfilter/ipict/ipict.cxx: 1095 in 
PictReader::ReadPixMapEtc(BitmapEx &, bool, bool, 

New Defects reported by Coverity Scan for LibreOffice

2018-11-18 Thread scan-admin
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.
5 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 4 of 4 defect(s)


** CID 1441444:  Integer handling issues  (SIGN_EXTENSION)
/sc/source/filter/inc/ftools.hxx: 104 in insert_value(T1 &, T2, unsigned char, unsigned char)()



*** CID 1441444:  Integer handling issues  (SIGN_EXTENSION)
/sc/source/filter/inc/ftools.hxx: 104 in insert_value(T1 &, T2, unsigned char, unsigned char)()
98 there at bit nStartBit. Other contents of rnBitField keep unchanged. 
*/
99 template< typename Type, typename InsertType >
100 void insert_value( Type& rnBitField, InsertType nValue, sal_uInt8 
nStartBit, sal_uInt8 nBitCount )
101 {
102 unsigned long nMask = ((1UL << nBitCount) - 1);
103 Type nNewValue = static_cast< Type >( nValue & nMask );
>>> CID 1441444:  Integer handling issues  (SIGN_EXTENSION)
>>> Suspicious implicit sign extension: "nNewValue" with type "sal_uInt16" 
>>> (16 bits, unsigned) is promoted in "nNewValue << nStartBit" to type "int" 
>>> (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, 
>>> unsigned).  If "nNewValue << nStartBit" is greater than 0x7FFF, the 
>>> upper bits of the result will all be 1.
104 rnBitField = (rnBitField & ~(nMask << nStartBit)) | (nNewValue << 
nStartBit);
105 }
106 
107 class Color;
108 class SfxPoolItem;
109 class SfxItemSet;

** CID 1441443:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/text/txtfrm.cxx: 3310 in 
SwTextFrame::CalcAdditionalFirstLineOffset()()



*** CID 1441443:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/text/txtfrm.cxx: 3310 in 
SwTextFrame::CalcAdditionalFirstLineOffset()()
3304 // reset additional first line offset
3305 mnAdditionalFirstLineOffset = 0;
3306 
3307 const SwTextNode* pTextNode( GetTextNodeForParaProps() );
3308 // sw_redlinehide: check that pParaPropsNode is the correct one
3309 assert(pTextNode->IsNumbered(getRootFrame()) == 
pTextNode->IsNumbered(nullptr));
>>> CID 1441443:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pTextNode" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
3310 if (pTextNode && pTextNode->IsNumbered(getRootFrame()) &&
3311 pTextNode->IsCountedInList() && pTextNode->GetNumRule())
3312 {
3313 int nListLevel = pTextNode->GetActualListLevel();
3314 
3315 if (nListLevel < 0)

** CID 1441442:  Integer handling issues  (SIGN_EXTENSION)
/sc/source/filter/inc/ftools.hxx: 104 in insert_value(T1 &, T2, unsigned char, unsigned char)()



*** CID 1441442:  Integer handling issues  (SIGN_EXTENSION)
/sc/source/filter/inc/ftools.hxx: 104 in insert_value(T1 &, T2, unsigned char, unsigned char)()
98 there at bit nStartBit. Other contents of rnBitField keep unchanged. 
*/
99 template< typename Type, typename InsertType >
100 void insert_value( Type& rnBitField, InsertType nValue, sal_uInt8 
nStartBit, sal_uInt8 nBitCount )
101 {
102 unsigned long nMask = ((1UL << nBitCount) - 1);
103 Type nNewValue = static_cast< Type >( nValue & nMask );
>>> CID 1441442:  Integer handling issues  (SIGN_EXTENSION)
>>> Suspicious implicit sign extension: "nNewValue" with type "sal_uInt16" 
>>> (16 bits, unsigned) is promoted in "nNewValue << nStartBit" to type "int" 
>>> (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, 
>>> unsigned).  If "nNewValue << nStartBit" is greater than 0x7FFF, the 
>>> upper bits of the result will all be 1.
104 rnBitField = (rnBitField & ~(nMask << nStartBit)) | (nNewValue << 
nStartBit);
105 }
106 
107 class Color;
108 class SfxPoolItem;
109 class SfxItemSet;

** CID 1441441:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/formulacell.cxx: 1505 in 
::TemporaryCellGroupMaker::~TemporaryCellGroupMaker()()



*** CID 1441441:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/formulacell.cxx: 1505 in 
::TemporaryCellGroupMaker::~TemporaryCellGroupMaker()()
1499 if( mEnabled && mCell->GetCellGroup() == nullptr )
1500 {
1501 mCell->CreateCellGroup( 1, false );
1502   

New Defects reported by Coverity Scan for LibreOffice

2018-11-07 Thread scan-admin
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.
9 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 4 of 4 defect(s)


** CID 1441102:  Incorrect expression  (COPY_PASTE_ERROR)
/filter/source/graphicfilter/ipict/ipict.cxx: 924 in 
PictReader::ReadPixMapEtc(BitmapEx &, bool, bool, tools::Rectangle *, 
tools::Rectangle *, bool, bool)()



*** CID 1441102:  Incorrect expression  (COPY_PASTE_ERROR)
/filter/source/graphicfilter/ipict/ipict.cxx: 924 in 
PictReader::ReadPixMapEtc(BitmapEx &, bool, bool, tools::Rectangle *, 
tools::Rectangle *, bool, bool)()
918 sal_uInt16  nByteCount, nCount, nD;
919 sal_uLong   nSrcBitsPos;
920 
921 if (nWidth > nRowBytes / 2)
922 return 0x;
923 
>>> CID 1441102:  Incorrect expression  (COPY_PASTE_ERROR)
>>> "nRowBytes" in "nRowBytes < 8" looks like a copy-paste error.
924 if (nRowBytes < 8 || nPackType == 1)
925 {
926 if (nHeight > pPict->remainingSize() / (sizeof(sal_uInt16) 
* nWidth))
927 return 0x;
928 }
929 else

** CID 1441101:  Incorrect expression  (ASSERT_SIDE_EFFECT)
/comphelper/source/misc/profilezone.cxx: 44 in 
comphelper::ProfileRecording::addRecording(const char *, long long)()



*** CID 1441101:  Incorrect expression  (ASSERT_SIDE_EFFECT)
/comphelper/source/misc/profilezone.cxx: 44 in 
comphelper::ProfileRecording::addRecording(const char *, long long)()
38 }
39 ProfileZone::g_bRecording = bStartRecording;
40 }
41 
42 long long addRecording(const char * aProfileId, long long aCreateTime)
43 {
>>> CID 1441101:  Incorrect expression  (ASSERT_SIDE_EFFECT)
>>> Argument "comphelper::ProfileZone::g_bRecording" of assert() has a side 
>>> effect because the variable is volatile.  The containing function might 
>>> work differently in a non-debug build.
44 assert( ProfileZone::g_bRecording );
45 
46 TimeValue systemTime;
47 osl_getSystemTime(  );
48 long long aTime = static_cast(systemTime.Seconds) * 
100 + systemTime.Nanosec/1000;
49 

** CID 1441100:  Memory - corruptions  (ARRAY_VS_SINGLETON)



*** CID 1441100:  Memory - corruptions  (ARRAY_VS_SINGLETON)
/cppu/source/uno/data.cxx: 57 in binuno_queryInterface::[lambda() (instance 
1)]::operator ()() const()
51 
TYPELIB_DANGER_GET(reinterpret_cast(),
52type_XInterface);
53 assert(pTXInterfaceDescr->ppAllMembers);
54 typelib_TypeDescription* pQITD = nullptr;
55 typelib_typedescriptionreference_getDescription(,
56 
pTXInterfaceDescr->ppAllMembers[0]);
>>> CID 1441100:  Memory - corruptions  (ARRAY_VS_SINGLETON)
>>> Passing ">aBase" to function 
>>> "TYPELIB_DANGER_RELEASE" which uses it as an array. This might corrupt or 
>>> misinterpret adjacent memory locations.
57 TYPELIB_DANGER_RELEASE(>aBase);
58 return pQITD;
59 }();
60 
61 uno_Any aRet, aExc;
62 uno_Any * pExc = 

** CID 1441099:  Error handling issues  (CHECKED_RETURN)
/vcl/source/outdev/font.cxx: 1134 in OutputDevice::ImplNewFont() const()



*** CID 1441099:  Error handling issues  (CHECKED_RETURN)
/vcl/source/outdev/font.cxx: 1134 in OutputDevice::ImplNewFont() const()
1128 if( (nNewWidth != nOrigWidth) && (nNewWidth != 0) )
1129 {
1130 Size aOrigSize = maFont.GetFontSize();
1131 const_cast(maFont).SetFontSize( Size( 
nNewWidth, aSize.Height() ) );
1132 mbMap = false;
1133 mbNewFont = true;
>>> CID 1441099:  Error handling issues  (CHECKED_RETURN)
>>> Calling "ImplNewFont" without checking return value (as is done 
>>> elsewhere 4 out of 5 times).
1134 ImplNewFont();  // recurse once using stretched width
1135 mbMap = true;
1136 const_cast(maFont).SetFontSize( aOrigSize );
1137 }
1138 }
1139 



To view the defects in Coverity Scan visit, 

New Defects reported by Coverity Scan for LibreOffice

2018-11-03 Thread scan-admin
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.
6 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 1440845:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/ui/dbui/customizeaddresslistdialog.cxx: 142 in 
SwCustomizeAddressListDialog::UpDownHdl_Impl(weld::Button &)()



*** CID 1440845:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/ui/dbui/customizeaddresslistdialog.cxx: 142 in 
SwCustomizeAddressListDialog::UpDownHdl_Impl(weld::Button &)()
136 OUString sHeader = m_xNewData->aDBColumnHeaders[nOldPos];
137 
m_xNewData->aDBColumnHeaders.erase(m_xNewData->aDBColumnHeaders.begin() + 
nOldPos);
138 
m_xNewData->aDBColumnHeaders.insert(m_xNewData->aDBColumnHeaders.begin() + 
nPos, sHeader);
139 for (auto& rData : m_xNewData->aDBData)
140 {
141 OUString sData = rData[nOldPos];
>>> CID 1440845:  API usage errors  (INVALIDATE_ITERATOR)
>>> Using invalid iterator "std::vector>> std::allocator >::const_iterator(rData->begin() + nOldPos)".
142 rData.erase(rData.begin() + nOldPos);
143 rData.insert(rData.begin() + nPos, sData);
144 }
145 
146 UpdateButtons();
147 }

** CID 1440844:  Memory - illegal accesses  (UNINIT)



*** CID 1440844:  Memory - illegal accesses  (UNINIT)
/vcl/source/gdi/impglyphitem.cxx: 33 in SalLayoutGlyphs::SalLayoutGlyphs(const 
SalLayoutGlyphs&)()
27 : m_pImpl(nullptr)
28 {
29 }
30 
31 SalLayoutGlyphs::~SalLayoutGlyphs() { delete m_pImpl; }
32 
>>> CID 1440844:  Memory - illegal accesses  (UNINIT)
>>> Using uninitialized value "this->m_pImpl" when calling "operator =".
33 SalLayoutGlyphs::SalLayoutGlyphs(const SalLayoutGlyphs& rOther) { 
operator=(rOther); }
34 
35 SalLayoutGlyphs& SalLayoutGlyphs::operator=(const SalLayoutGlyphs& 
rOther)
36 {
37 delete m_pImpl;
38 m_pImpl = rOther.m_pImpl ? rOther.m_pImpl->clone(*this) : nullptr;

** CID 1440843:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/sot/source/sdstor/stgdir.cxx: 661 in StgDirEntry::Tmp2Strm()()



*** CID 1440843:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/sot/source/sdstor/stgdir.cxx: 661 in StgDirEntry::Tmp2Strm()()
655 return false;
656 }
657 else
658 {
659 m_pStgStrm->SetSize( 0 );
660 delete m_pStgStrm;
>>> CID 1440843:  Memory - illegal accesses  (WRAPPER_ESCAPE)
>>> The internal representation of local "pNewStrm" escapes into 
>>> "this->m_pStgStrm", but is destroyed when it exits scope.
661 m_pStgStrm = pNewStrm.get();
662 pNewStrm->SetEntry( *this );
663 pNewStrm->Pos2Page( m_nPos );
664 pNewStrm.release();
665 delete m_pTmpStrm;
666 delete m_pCurStrm;

** CID 1440842:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/ui/dbui/customizeaddresslistdialog.cxx: 118 in 
SwCustomizeAddressListDialog::DeleteHdl_Impl(weld::Button &)()



*** CID 1440842:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/ui/dbui/customizeaddresslistdialog.cxx: 118 in 
SwCustomizeAddressListDialog::DeleteHdl_Impl(weld::Button &)()
112 m_xFieldsLB->select(nPos > m_xFieldsLB->n_children() - 1 ? nPos - 1 
: nPos);
113 
114 //remove the column
115 
m_xNewData->aDBColumnHeaders.erase(m_xNewData->aDBColumnHeaders.begin() + nPos);
116 //remove the data
117 for (auto& rData : m_xNewData->aDBData)
>>> CID 1440842:  API usage errors  (INVALIDATE_ITERATOR)
>>> Using invalid iterator "std::vector>> std::allocator >::const_iterator(rData->begin() + nPos)".
118 rData.erase(rData.begin() + nPos);
119 
120 UpdateButtons();
121 }
122 
123 IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, weld::Button&, 
rButton, void)

** CID 1440841:  Error handling issues  (CHECKED_RETURN)
/vcl/source/outdev/font.cxx: 977 in OutputDevice::GetFontInstance() const()



*** CID 1440841:  Error handling issues  (CHECKED_RETURN)
/vcl/source/outdev/font.cxx: 977 in OutputDevice::GetFontInstance() const()

New Defects reported by Coverity Scan for LibreOffice

2018-10-20 Thread scan-admin
Hi,

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

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


** CID 1440400:  Resource leaks  (CTOR_DTOR_LEAK)
/sw/source/uibase/dbui/mailmergehelper.cxx: 549 in 
AddressPreview::AddressPreview(std::unique_ptr>)()



*** CID 1440400:  Resource leaks  (CTOR_DTOR_LEAK)
/sw/source/uibase/dbui/mailmergehelper.cxx: 549 in 
AddressPreview::AddressPreview(std::unique_ptr>)()
543 }
544 return sAddress.makeStringAndClear();
545 }
546 
547 AddressPreview::AddressPreview(std::unique_ptr 
xWindow)
548 : m_xVScrollBar(std::move(xWindow))
>>> CID 1440400:  Resource leaks  (CTOR_DTOR_LEAK)
>>> Allocating memory by calling "new SwAddressPreview_Impl".
549 , pImpl(new SwAddressPreview_Impl())
550 {
551 m_xVScrollBar->set_user_managed_scrolling();
552 m_xVScrollBar->connect_vadjustment_changed(LINK(this, 
AddressPreview, ScrollHdl));
553 }
554 



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyfMvAD-2B4zVnyq0pz6UPDkb8dpFeaCou3K53ghLodOcIJ3KbY09rjje7p7AjGcZ4tNBeJlcauNAEMQJDABeB3jRzCMBCNyIYdWxA5PBkm4xeMdfNWHpT8JYajeWX2vSm5hqZ8eLlS0JrufJsWU4FYYRC4tOfBgwZyd1h7uDPS6VFI-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2018-10-16 Thread Stephan Bergmann

On 16/10/2018 16:03, Caolán McNamara wrote:

On Tue, 2018-10-16 at 12:33 +, scan-ad...@coverity.com wrote:


** CID 1440303:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/column3.cxx: 2394 in
::FormulaToValueHandler::Entry::Entry(::FormulaToVa
lueHandler::Entry&&)()


FWIW I think the const-ing up of loplugin:constfields effectively
disables move constructors


https://www.chromium.org/rvalue-references?tmpl=%2Fsystem%2Fapp%2Ftemplates%2Fprint%2F=1#TOC-8.-Move-constructors-will-only-bind-to-non-const-rvalues
.


the poor consequences of loplugin:constfields notwithstanding, i think 
the coverity warning is bogus or incomplete:  ScCellValue's both copy 
and move ctors are potentially throwing, so Entry's impl defined move 
ctor may indeed throw an exception, but will impl have a potentially 
throwing exception spec (whether or not Entry's



ScCellValue const maValue;


member is const).  and the coverity analysis doesnt show that such an 
exception isnt caught, but claims "If the exception is ever thrown, the 
program will crash."

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2018-10-16 Thread Caolán McNamara
On Tue, 2018-10-16 at 12:33 +, scan-ad...@coverity.com wrote:
> 
> ** CID 1440303:  Error handling issues  (UNCAUGHT_EXCEPT)
> /sc/source/core/data/column3.cxx: 2394 in
> ::FormulaToValueHandler::Entry::Entry(::FormulaToVa
> lueHandler::Entry&&)()

FWIW I think the const-ing up of loplugin:constfields effectively
disables move constructors


https://www.chromium.org/rvalue-references?tmpl=%2Fsystem%2Fapp%2Ftemplates%2Fprint%2F=1#TOC-8.-Move-constructors-will-only-bind-to-non-const-rvalues
.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2018-10-16 Thread Caolán McNamara
On Tue, 2018-10-16 at 16:14 +0300, Arkadiy Illarionov wrote:
> 
> I suppose it's FP since aI ∈ [rGroup.begin(); aStart) ∪
> (aStart; rGroup.end()).

Seems a false positive to me anyway.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2018-10-16 Thread Arkadiy Illarionov
вт, 16 окт. 2018 г. в 15:34, :

> ** CID 1440300:  API usage errors  (INVALIDATE_ITERATOR)
> /vcl/source/window/dlgctrl.cxx: 548 in ::focusNextInGroup(const
> __gnu_cxx::__normal_iterator *,
> std::vector, std::allocator>>> &,
> std::vector, std::allocator>> &)()
>
>
>
> 
> *** CID 1440300:  API usage errors  (INVALIDATE_ITERATOR)
> /vcl/source/window/dlgctrl.cxx: 548 in ::focusNextInGroup(const
> __gnu_cxx::__normal_iterator *,
> std::vector, std::allocator>>> &,
> std::vector, std::allocator>> &)()
> 542 {
> 543 aI = std::find_if(rGroup.begin(), aStart,
> isSuitableDestination);
> 544 if (aI == aStart)
> 545 return false;
> 546 }
> 547
> >>> CID 1440300:  API usage errors  (INVALIDATE_ITERATOR)
> >>> Dereferencing iterator "aI" though it is already past the end of
> its container.
> 548 vcl::Window *pWindow = *aI;
> 549
> 550 pWindow->ImplControlFocus( GetFocusFlags::CURSOR |
> GetFocusFlags::Forward );
> 551 return true;
> 552 }
> 553
>

I suppose it's FP since aI ∈ [rGroup.begin(); aStart) ∪
(aStart; rGroup.end()).
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2018-10-16 Thread scan-admin
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.
5 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 4 of 4 defect(s)


** CID 1440303:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/column3.cxx: 2394 in 
::FormulaToValueHandler::Entry::Entry(::FormulaToValueHandler::Entry&&)()



*** CID 1440303:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/column3.cxx: 2394 in 
::FormulaToValueHandler::Entry::Entry(::FormulaToValueHandler::Entry&&)()
2388 }
2389 
2390 namespace {
2391 
2392 class FormulaToValueHandler
2393 {
>>> CID 1440303:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the throw list "throw()" doesn't allow it to be thrown. This will cause 
>>> a call to unexpected() which usually calls terminate().
2394 struct Entry
2395 {
2396 SCROW const mnRow;
2397 ScCellValue const maValue;
2398 
2399 Entry(SCROW nRow, double f) : mnRow(nRow), maValue(f) {}

** CID 1440302:  Error handling issues  (UNCAUGHT_EXCEPT)
/oox/qa/unit/vba_compression.cxx: 20 in 
TestVbaCompression::TestVbaCompression()()



*** CID 1440302:  Error handling issues  (UNCAUGHT_EXCEPT)
/oox/qa/unit/vba_compression.cxx: 20 in 
TestVbaCompression::TestVbaCompression()()
14 #include 
15 #include 
16 #include 
17 #include 
18 #include 
19 
>>> CID 1440302:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "CppUnit::Exception" is thrown but the throw list 
>>> "throw()" doesn't allow it to be thrown. This will cause a call to 
>>> unexpected() which usually calls terminate().
20 class TestVbaCompression : public CppUnit::TestFixture
21 {
22 public:
23 // just a sequence of bytes that should not be compressed at all
24 void testSimple1();
25 

** CID 1440301:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/column3.cxx: 2394 in 
::FormulaToValueHandler::Entry::Entry(const 
::FormulaToValueHandler::Entry&)()



*** CID 1440301:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/core/data/column3.cxx: 2394 in 
::FormulaToValueHandler::Entry::Entry(const 
::FormulaToValueHandler::Entry&)()
2388 }
2389 
2390 namespace {
2391 
2392 class FormulaToValueHandler
2393 {
>>> CID 1440301:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the throw list "throw()" doesn't allow it to be thrown. This will cause 
>>> a call to unexpected() which usually calls terminate().
2394 struct Entry
2395 {
2396 SCROW const mnRow;
2397 ScCellValue const maValue;
2398 
2399 Entry(SCROW nRow, double f) : mnRow(nRow), maValue(f) {}

** CID 1440300:  API usage errors  (INVALIDATE_ITERATOR)
/vcl/source/window/dlgctrl.cxx: 548 in ::focusNextInGroup(const 
__gnu_cxx::__normal_iterator *, 
std::vector, std::allocator>>> &, 
std::vector, std::allocator>> &)()



*** CID 1440300:  API usage errors  (INVALIDATE_ITERATOR)
/vcl/source/window/dlgctrl.cxx: 548 in ::focusNextInGroup(const 
__gnu_cxx::__normal_iterator *, 
std::vector, std::allocator>>> &, 
std::vector, std::allocator>> &)()
542 {
543 aI = std::find_if(rGroup.begin(), aStart, 
isSuitableDestination);
544 if (aI == aStart)
545 return false;
546 }
547 
>>> CID 1440300:  API usage errors  (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "aI" though it is already past the end of its 
>>> container.
548 vcl::Window *pWindow = *aI;
549 
550 pWindow->ImplControlFocus( GetFocusFlags::CURSOR | 
GetFocusFlags::Forward );
551 return true;
552 }
553 



To view the defects in Coverity Scan visit, 

New Defects reported by Coverity Scan for LibreOffice

2018-10-11 Thread scan-admin
Hi,

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

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


** CID 1440243:  Uninitialized members  (UNINIT_CTOR)
/sw/source/core/txtnode/txtedt.cxx: 746 in SwScanner::SwScanner(const 
SwTextNode &, const rtl::OUString &, const o3tl::strong_int *, const ModelToViewHelper &, unsigned short, int, int, bool)()



*** CID 1440243:  Uninitialized members  (UNINIT_CTOR)
/sw/source/core/txtnode/txtedt.cxx: 746 in SwScanner::SwScanner(const 
SwTextNode &, const rtl::OUString &, const o3tl::strong_int *, const ModelToViewHelper &, unsigned short, int, int, bool)()
740 sal_uInt16 nType, sal_Int32 nStart, sal_Int32 nEnde, bool bClp )
741 : SwScanner(
742 [](sal_Int32 const nBegin, sal_uInt16 const nScript, bool 
const bNoChar)
743 { return rNd.GetLang(nBegin, bNoChar ? 0 : 1, nScript); }
744 , rText, pLang, rConvMap, nType, nStart, nEnde, bClp)
745 {
>>> CID 1440243:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member field "m_pGetLangOfChar._M_invoker" is not 
>>> initialized in this constructor nor in any functions that it calls.
746 }
747 
748 SwScanner::SwScanner(std::function const& pGetLangOfChar,
749  const OUString& rText, const LanguageType* pLang,
750  const ModelToViewHelper& rConvMap, sal_uInt16 
nType, sal_Int32 nStart,
751  sal_Int32 nEnde, bool bClp)

** CID 1440242:  Incorrect expression  (USELESS_CALL)



*** CID 1440242:  Incorrect expression  (USELESS_CALL)
/vcl/unx/generic/glyphs/freetype_glyphcache.cxx: 281 in 
GlyphCache::InitFreetype()()
275 if( pEnv )
276 nDefaultPrioAntiAlias = pEnv[0] - '0';
277 pEnv = ::getenv( "SAL_AUTOHINTING_PRIORITY" );
278 if( pEnv )
279 nDefaultPrioAutoHint  = pEnv[0] - '0';
280 
>>> CID 1440242:  Incorrect expression  (USELESS_CALL)
>>> Calling "rtl::Static>> std::shared_ptr, rtl::CStringHash, rtl::CStringEqual, 
>>> std::allocator>> std::shared_ptr > > >, 
>>> ::vclFontFileList>::get()" is only useful for its return value, 
>>> which is ignored.
281 vclFontFileList::get();
282 }
283 
284 FT_Face FreetypeFont::GetFtFace() const
285 {
286 FT_Activate_Size( maSizeFT );

** CID 1440241:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1440241:  Null pointer dereferences  (FORWARD_NULL)
/svtools/source/filter/exportdialog.cxx: 951 in ExportDialog::updateControls()()
945 }
946 mxNfResolution->set_value( nResolution );
947 
948 if (mpSbCompression && mpSbCompression->get_visible() && 
mpNfCompression)
949 mpSbCompression->set_value(mpNfCompression->get_value());
950 
>>> CID 1440241:  Null pointer dereferences  (FORWARD_NULL)
>>> "GetGraphicStream" dereferences null "this->mpSbCompression".
951 GetGraphicStream();
952 
953 // updating estimated size
954 sal_Int64 nRealFileSize( mpTempStream->Tell() );
955 if ( mbIsPixelFormat )
956 {

** CID 1440240:  Error handling issues  (UNCAUGHT_EXCEPT)
/starmath/source/view.cxx: 852 in SmViewShell_Impl::SmViewShell_Impl()()



*** CID 1440240:  Error handling issues  (UNCAUGHT_EXCEPT)
/starmath/source/view.cxx: 852 in SmViewShell_Impl::SmViewShell_Impl()()
846 
847 // make window docked to the bottom initially (after first start)
848 SetAlignment(SfxChildAlignment::BOTTOM);
849 static_cast(GetWindow())->Initialize(pInfo);
850 }
851 
>>> CID 1440240:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::RuntimeException" is thrown 
>>> but the throw list "throw()" doesn't allow it to be thrown. This will cause 
>>> a call to unexpected() which usually calls terminate().
852 struct SmViewShell_Impl
853 {
854 std::unique_ptr pDocInserter;
855 std::unique_ptr pRequest;
856 SvtMiscOptions constaOpts;
857 };

** CID 1440239:  Error handling issues  (UNCAUGHT_EXCEPT)
/sd/source/ui/view/viewshel.cxx: 1209 in 
sd::KeepSlideSorterInSyncWithPageChanges::~KeepSlideSorterInSyncWithPageChanges()()



New Defects reported by Coverity Scan for LibreOffice

2018-09-20 Thread scan-admin
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.
12 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 4 of 4 defect(s)


** CID 1439599:  Uninitialized members  (UNINIT_CTOR)
/svx/source/dialog/measctrl.cxx: 35 in 
SvxXMeasurePreview::SvxXMeasurePreview()()



*** CID 1439599:  Uninitialized members  (UNINIT_CTOR)
/svx/source/dialog/measctrl.cxx: 35 in 
SvxXMeasurePreview::SvxXMeasurePreview()()
29 SvxXMeasurePreview::SvxXMeasurePreview()
30 : m_aMapMode(MapUnit::Map100thMM)
31 {
32 // Scale: 1:2
33 m_aMapMode.SetScaleX(Fraction(1, 2));
34 m_aMapMode.SetScaleY(Fraction(1, 2));
>>> CID 1439599:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "pMeasureObj" is not initialized in this 
>>> constructor nor in any functions that it calls.
35 }
36 
37 void SvxXMeasurePreview::SetDrawingArea(weld::DrawingArea* pDrawingArea)
38 {
39 CustomWidgetController::SetDrawingArea(pDrawingArea);
40 Size aSize(getPreviewStripSize(pDrawingArea->get_ref_device()));

** CID 1439598:  Incorrect expression  (MIXED_ENUMS)
/sw/source/uibase/config/modcfg.cxx: 252 in 
SwRevisionConfig::SwRevisionConfig()()



*** CID 1439598:  Incorrect expression  (MIXED_ENUMS)
/sw/source/uibase/config/modcfg.cxx: 252 in 
SwRevisionConfig::SwRevisionConfig()()
246 ConfigItemMode::DelayedUpdate|ConfigItemMode::ReleaseTree)
247 {
248 m_aInsertAttr.m_nItemId = SID_ATTR_CHAR_UNDERLINE;
249 m_aInsertAttr.m_nAttr = LINESTYLE_SINGLE;
250 m_aInsertAttr.m_nColor = COL_TRANSPARENT;
251 m_aDeletedAttr.m_nItemId = SID_ATTR_CHAR_STRIKEOUT;
>>> CID 1439598:  Incorrect expression  (MIXED_ENUMS)
>>> Mixing enum types "FontLineStyle" and "FontStrikeout" for "m_nAttr".
252 m_aDeletedAttr.m_nAttr = STRIKEOUT_SINGLE;
253 m_aDeletedAttr.m_nColor = COL_TRANSPARENT;
254 m_aFormatAttr.m_nItemId = SID_ATTR_CHAR_WEIGHT;
255 m_aFormatAttr.m_nAttr = WEIGHT_BOLD;
256 m_aFormatAttr.m_nColor = COL_BLACK;
257 Load();

** CID 1439597:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/filter/ww8/ww8atr.cxx: 5520 in 
AttributeOutputBase::GetParagraphMarkerRedline(const SwTextNode &, unsigned 
short)()



*** CID 1439597:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/filter/ww8/ww8atr.cxx: 5520 in 
AttributeOutputBase::GetParagraphMarkerRedline(const SwTextNode &, unsigned 
short)()
5514 sal_uLong uEndNodeIndex   = pCheckedEnd->nNode.GetIndex();
5515 sal_uLong uEndCharIndex   = pCheckedEnd->nContent.GetIndex();
5516 sal_uLong uNodeIndex = rNode.GetIndex();
5517 
5518 if( uStartNodeIndex <= uNodeIndex && uNodeIndex < 
uEndNodeIndex )
5519 {
>>> CID 1439597:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pCheckedEnd" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
5520 if ( !pCheckedEnd )
5521 continue;
5522 
5523 // Maybe add here a check that also the start & end of the 
redline is the entire paragraph
5524 if ( ( uStartNodeIndex < uEndNodeIndex ) &&
5525  // check start:

** CID 1439596:  Incorrect expression  (MIXED_ENUMS)
/sw/source/uibase/config/modcfg.cxx: 255 in 
SwRevisionConfig::SwRevisionConfig()()



*** CID 1439596:  Incorrect expression  (MIXED_ENUMS)
/sw/source/uibase/config/modcfg.cxx: 255 in 
SwRevisionConfig::SwRevisionConfig()()
249 m_aInsertAttr.m_nAttr = LINESTYLE_SINGLE;
250 m_aInsertAttr.m_nColor = COL_TRANSPARENT;
251 m_aDeletedAttr.m_nItemId = SID_ATTR_CHAR_STRIKEOUT;
252 m_aDeletedAttr.m_nAttr = STRIKEOUT_SINGLE;
253 m_aDeletedAttr.m_nColor = COL_TRANSPARENT;
254 m_aFormatAttr.m_nItemId = SID_ATTR_CHAR_WEIGHT;
>>> CID 1439596:  Incorrect expression  (MIXED_ENUMS)
>>> Mixing enum types "FontLineStyle" and "FontWeight" for "m_nAttr".
255 m_aFormatAttr.m_nAttr = WEIGHT_BOLD;
256 m_aFormatAttr.m_nColor = COL_BLACK;
257 Load();
258 }
259 
260 SwRevisionConfig::~SwRevisionConfig()



To 

New Defects reported by Coverity Scan for LibreOffice

2018-09-14 Thread scan-admin
Hi,

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

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


** CID 1439340:  Error handling issues  (CHECKED_RETURN)
/sfx2/qa/cppunit/test_misc.cxx: 190 in ::MiscTest::testHardLinks()()



*** CID 1439340:  Error handling issues  (CHECKED_RETURN)
/sfx2/qa/cppunit/test_misc.cxx: 190 in ::MiscTest::testHardLinks()()
184 int nRet = stat(aOld.getStr(), );
185 CPPUNIT_ASSERT_EQUAL(0, nRet);
186 // This failed: hard link count was 1, the hard link broke on store.
187 CPPUNIT_ASSERT(buf.st_nlink > 1);
188 
189 // Test that symlinks are presreved as well.
>>> CID 1439340:  Error handling issues  (CHECKED_RETURN)
>>> Calling "remove(aNew.getStr())" without checking return value. This 
>>> library function may fail and return an error code.
190 remove(aNew.getStr());
191 symlink(aOld.getStr(), aNew.getStr());
192 xStorable->storeToURL(aURL + ".2", {});
193 nRet = lstat(aNew.getStr(), );
194 CPPUNIT_ASSERT_EQUAL(0, nRet);
195 // This failed, the hello.odt.2 symlink was replaced with a real 
file.

** CID 1439339:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1439339:  Null pointer dereferences  (NULL_RETURNS)
/sw/source/ui/envelp/label1.cxx: 684 in 
SwBusinessDataPage::FillItemSet(SfxItemSet *)()
678 FillItemSet(_pSet);
679 return DeactivateRC::LeavePage;
680 }
681 
682 bool SwBusinessDataPage::FillItemSet(SfxItemSet* rSet)
683 {
>>> CID 1439339:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be null 
>>> "this->GetDialogExampleSet()" when calling "Get".
684 SwLabItem aItem = static_cast(GetDialogExampleSet()->Get(FN_LABEL));
685 
686 aItem.m_aCompCompany   = m_xCompanyED->get_text();
687 aItem.m_aCompCompanyExt= m_xCompanyExtED->get_text();
688 aItem.m_aCompSlogan= m_xSloganED->get_text();
689 aItem.m_aCompStreet= m_xStreetED->get_text();

** CID 1439338:  Security best practices violations  (TOCTOU)
/sfx2/qa/cppunit/test_misc.cxx: 184 in ::MiscTest::testHardLinks()()



*** CID 1439338:  Security best practices violations  (TOCTOU)
/sfx2/qa/cppunit/test_misc.cxx: 184 in ::MiscTest::testHardLinks()()
178 CPPUNIT_ASSERT(xComponent.is());
179 
180 uno::Reference xStorable(xComponent, 
uno::UNO_QUERY);
181 xStorable->store();
182 
183 struct stat buf;
>>> CID 1439338:  Security best practices violations  (TOCTOU)
>>> Calling function "stat" to perform check on "aOld.getStr()".
184 int nRet = stat(aOld.getStr(), );
185 CPPUNIT_ASSERT_EQUAL(0, nRet);
186 // This failed: hard link count was 1, the hard link broke on store.
187 CPPUNIT_ASSERT(buf.st_nlink > 1);
188 
189 // Test that symlinks are presreved as well.

** CID 1439337:  Uninitialized members  (UNINIT_CTOR)
/svx/source/dialog/svxbmpnumvalueset.cxx: 822 in 
SvxBmpNumValueSet::SvxBmpNumValueSet(std::unique_ptr>)()



*** CID 1439337:  Uninitialized members  (UNINIT_CTOR)
/svx/source/dialog/svxbmpnumvalueset.cxx: 822 in 
SvxBmpNumValueSet::SvxBmpNumValueSet(std::unique_ptr>)()
816 }
817 
818 
SvxBmpNumValueSet::SvxBmpNumValueSet(std::unique_ptr 
pScrolledWindow)
819 : NumValueSet(std::move(pScrolledWindow))
820 , aFormatIdle("SvxBmpNumValueSet FormatIdle")
821 {
>>> CID 1439337:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "bGrfNotFound" is not initialized in this 
>>> constructor nor in any functions that it calls.
822 }
823 
824 void SvxBmpNumValueSet::init()
825 {
826 NumValueSet::init(NumberingPageType::BITMAP);
827 bGrfNotFound = false;

** CID 1439336:  Resource leaks  (VIRTUAL_DTOR)



*** CID 1439336:  Resource leaks  (VIRTUAL_DTOR)

** CID 1439335:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1439335:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/crsr/findattr.cxx: 631 in SwAttrCheckArr::SetAttrBwd(const 

Re: New Defects reported by Coverity Scan for LibreOffice

2018-08-30 Thread Kohei Yoshida
Hi there,

> On August 30, 2018 at 11:25 AM scan-ad...@coverity.com wrote:

> ** CID 1438872:(UNUSED_VALUE)

I did look into this and I confirm coverity's assessment.  It should be 
resolved with the following commit:

https://gitlab.com/mdds/mdds/commit/61900151e63d232d6c49891bccb7f5d1c1976991

> ** CID 1438870:  Performance inefficiencies  (PASS_BY_VALUE)
> /usr/include/mdds-1.4/mdds/multi_type_matrix_def.inl: 697 in 
> mdds::multi_type_matrix::walk<::WalkElementBlockOperation>(T1,
>  const mdds::multi_type_matrix::size_pair_type &, const 
> mdds::multi_type_matrix::size_pair_type &) const()

This one, however, is related to the function object being passed by value, and 
it's intentional.  It's modeled after how std::for_each implementation takes 
its function object by value and returns either a copied or a moved instance of 
it.

As far as I know it cannot support inline lambdas unless the method takes the 
function object by value.

--
Kohei Yoshida, LibreOffice Calc volunteer hacker
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2018-08-30 Thread scan-admin
Hi,

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

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


** CID 1438872:(UNUSED_VALUE)
/usr/include/mdds-1.4/mdds/multi_type_vector_def.inl: 1881 in 
mdds::multi_type_vector>, 
mdds::detail::mtv::event_func>::transfer_multi_blocks(unsigned long, unsigned 
long, unsigned long, unsigned long, unsigned long, unsigned long, 
mdds::multi_type_vector>, mdds::detail::mtv::event_func>&, unsigned long)()
/usr/include/mdds-1.4/mdds/multi_type_vector_def.inl: 1891 in 
mdds::multi_type_vector>, 
mdds::detail::mtv::event_func>::transfer_multi_blocks(unsigned long, unsigned 
long, unsigned long, unsigned long, unsigned long, unsigned long, 
mdds::multi_type_vector>, mdds::detail::mtv::event_func>&, unsigned long)()
/usr/include/mdds-1.4/mdds/multi_type_vector_def.inl: 1881 in 
mdds::multi_type_vector>, mdds::detail::mtv::event_func>::transfer_multi_blocks(unsigned 
long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned 
long, 
mdds::multi_type_vector>, mdds::detail::mtv::event_func>&, unsigned long)()
/usr/include/mdds-1.4/mdds/multi_type_vector_def.inl: 1891 in 
mdds::multi_type_vector>, mdds::detail::mtv::event_func>::transfer_multi_blocks(unsigned 
long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned 
long, 
mdds::multi_type_vector>, mdds::detail::mtv::event_func>&, unsigned long)()
/usr/include/mdds-1.4/mdds/multi_type_vector_def.inl: 1881 in 
mdds::multi_type_vector, mdds::mtv::noncopyable_managed_element_block<(int)53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<(int)54, 
ScFormulaCell>>, sc::CellStoreEvent>::transfer_multi_blocks(unsigned long, 
unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, 
mdds::multi_type_vector, mdds::mtv::noncopyable_managed_element_block<(int)53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<(int)54, 
ScFormulaCell>>, sc::CellStoreEvent>&, unsigned long)()
/usr/include/mdds-1.4/mdds/multi_type_vector_def.inl: 1891 in 
mdds::multi_type_vector, mdds::mtv::noncopyable_managed_element_block<(int)53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<(int)54, 
ScFormulaCell>>, sc::CellStoreEvent>::transfer_multi_blocks(unsigned long, 
unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, 
mdds::multi_type_vector, mdds::mtv::noncopyable_managed_element_block<(int)53, 
EditTextObject>, mdds::mtv::noncopyable_managed_element_block<(int)54, 
ScFormulaCell>>, sc::CellStoreEvent>&, unsigned long)()
/usr/include/mdds-1.4/mdds/multi_type_vector_def.inl: 1881 in 
mdds::multi_type_vector>, 
mdds::detail::mtv::event_func>::transfer_multi_blocks(unsigned long, unsigned 
long, unsigned long, unsigned long, unsigned long, unsigned long, 
mdds::multi_type_vector>, mdds::detail::mtv::event_func>&, unsigned long)()
/usr/include/mdds-1.4/mdds/multi_type_vector_def.inl: 1891 in 
mdds::multi_type_vector>, 
mdds::detail::mtv::event_func>::transfer_multi_blocks(unsigned long, unsigned 
long, unsigned long, unsigned long, unsigned long, unsigned long, 
mdds::multi_type_vector>, mdds::detail::mtv::event_func>&, unsigned long)()



*** CID 1438872:(UNUSED_VALUE)
/usr/include/mdds-1.4/mdds/multi_type_vector_def.inl: 1881 in 
mdds::multi_type_vector>, 
mdds::detail::mtv::event_func>::transfer_multi_blocks(unsigned long, unsigned 
long, unsigned long, unsigned long, unsigned long, unsigned long, 
mdds::multi_type_vector>, mdds::detail::mtv::event_func>&, unsigned long)()
1875 // Copy to the top part of destination block.
1876 if (len < blk_dest->m_size)
1877 {
1878 // Shrink the existing block and insert slots for new 
blocks before it.
1879 blk_dest->m_size -= len;
1880 
dest.m_blocks.insert(dest.m_blocks.begin()+dest_block_index, block_len, 
block());
>>> CID 1438872:(UNUSED_VALUE)
>>> Assigning value from "dest.m_blocks[dest_block_index + block_len]" to 
>>> "blk_dest" here, but that stored value is overwritten before it can be used.
1881 blk_dest = _blocks[dest_block_index+block_len];
1882 }
1883 else
1884 {
1885 // Destination block is exactly of the length of the 
elements being transferred.
1886 dest.delete_element_block(*blk_dest);
/usr/include/mdds-1.4/mdds/multi_type_vector_def.inl: 1891 in 
mdds::multi_type_vector>, 
mdds::detail::mtv::event_func>::transfer_multi_blocks(unsigned long, unsigned 
long, unsigned long, unsigned long, unsigned long, unsigned long, 
mdds::multi_type_vector>, 

New Defects reported by Coverity Scan for LibreOffice

2018-08-27 Thread scan-admin
Hi,

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

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


** CID 1438785:  Uninitialized members  (UNINIT_CTOR)
/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx: 107 in 
connectivity::mysqlc::OResultSet::OResultSet(connectivity::mysqlc::OConnection 
&, connectivity::mysqlc::OCommonStatement *, st_mysql_res *, unsigned short)()



*** CID 1438785:  Uninitialized members  (UNINIT_CTOR)
/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx: 107 in 
connectivity::mysqlc::OResultSet::OResultSet(connectivity::mysqlc::OConnection 
&, connectivity::mysqlc::OCommonStatement *, st_mysql_res *, unsigned short)()
101 , m_xMetaData(nullptr)
102 , m_pResult(pResult)
103 , fieldCount(0)
104 , m_encoding(_encoding)
105 {
106 fieldCount = mysql_num_fields(pResult);
>>> CID 1438785:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_aRow" is not initialized in this constructor 
>>> nor in any functions that it calls.
107 }
108 
109 OResultSet::~OResultSet() {}
110 
111 void OResultSet::disposing()
112 {

** CID 1438784:  Uninitialized members  (UNINIT_CTOR)
/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx: 70 in 
connectivity::mysqlc::OConnection::OConnection(connectivity::mysqlc::MysqlCDriver
 &)()



*** CID 1438784:  Uninitialized members  (UNINIT_CTOR)
/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx: 70 in 
connectivity::mysqlc::OConnection::OConnection(connectivity::mysqlc::MysqlCDriver
 &)()
64 
65 OConnection::OConnection(MysqlCDriver& _rDriver)
66 : OMetaConnection_BASE(m_aMutex)
67 , m_xMetaData(nullptr)
68 , m_xDriver(&_rDriver)
69 {
>>> CID 1438784:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member field "m_mysql.extension" is not initialized in 
>>> this constructor nor in any functions that it calls.
70 }
71 
72 OConnection::~OConnection()
73 {
74 if (!isClosed())
75 {

** CID 1438783:  Error handling issues  (CHECKED_RETURN)
/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx: 66 in 
connectivity::mysqlc::OResultSetMetaData::isCaseSensitive(int)()



*** CID 1438783:  Error handling issues  (CHECKED_RETURN)
/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx: 66 in 
connectivity::mysqlc::OResultSetMetaData::isCaseSensitive(int)()
60 sql.append(rtl::OUString::number(pField->charsetnr));
61 
62 Reference stmt = m_rConnection.createStatement();
63 Reference rs = 
stmt->executeQuery(sql.makeStringAndClear());
64 Reference xRow(rs, UNO_QUERY_THROW);
65 
>>> CID 1438783:  Error handling issues  (CHECKED_RETURN)
>>> Calling "next" without checking return value (as is done elsewhere 189 
>>> out of 196 times).
66 rs->next(); // fetch first and only row
67 rtl::OUString sColName = xRow->getString(1); // first column is 
Collation name
68 
69 return !sColName.isEmpty() && !sColName.endsWith("_ci");
70 }
71 



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyyOwYaWC-2BsPwf18-2BUOunOC1fLUGHQiEoPHPfZ4AZbM4pRjFzQSzjJ84-2BsezUcDnIqZk6SNlhBC9LsvmBIePrsFme9rm1aDfL92Y1az1a0af3s2TIYWSGvGZMrE5r1gwvNif01WbGWfm8ZUXDt-2Blx1D4daGoXk-2B-2FEYjAHc9U0q9SM-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2018-08-24 Thread scan-admin
Hi,

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

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


** CID 1438527:  Control flow issues  (NESTING_INDENT_MISMATCH)
/sw/source/filter/ww8/wrtww8.cxx: 3383 in WW8Export::ExportDocument_Impl()()



*** CID 1438527:  Control flow issues  (NESTING_INDENT_MISMATCH)
/sw/source/filter/ww8/wrtww8.cxx: 3383 in WW8Export::ExportDocument_Impl()()
3377 pStrmTemp = xWwStrm.get();
3378 pTableStrmTemp = xTableStrm.get();
3379 pDataStrmTemp = xDataStrm.get();
3380 
3381 if ( pDataStrmTemp && pDataStrmTemp != pStrmTemp)
3382 err = EncryptRC4(aCtx, *pDataStrm, *pDataStrmTemp);
>>> CID 1438527:  Control flow issues  (NESTING_INDENT_MISMATCH)
>>> This 'if'  statement is indented to column 13, as if it were nested 
>>> within the preceding parent statement, but it is not.
3383 if (err != ERRCODE_NONE) {
3384 goto done;
3385 }
3386 
3387 err = EncryptRC4(aCtx, *pTableStrm, *pTableStrmTemp);
3388 if (err != ERRCODE_NONE) {



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpye5MqKofAK7vKtPm6sr9WoLy8WJ7V5T-2FECpQ0VOCuUCepPrBsfWyhIfRVjKpuIgfLLXCeg88MxxomvNJ3s2kqXfylO-2Bb-2FUAf1Ulme8iv2kqQDdA3LsUOFfZ61LYYGtJWyiGV5W0M8j6v-2BcXIFqjOebK7zyAGgUd-2BMhGikzWyw-2Ftw-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2018-08-22 Thread Kaganski Mike
For a specific case of N = 1, the code is really unreachable :-)
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: New Defects reported by Coverity Scan for LibreOffice

2018-08-22 Thread Stephan Bergmann

On 22/08/18 12:31, scan-ad...@coverity.com wrote:

** CID 1438474:  Control flow issues  (DEADCODE)
/include/rtl/stringutils.hxx: 176 in 
rtl::libreoffice_internal::ConstCharArrayDetector::isValid(const char (&)[1])()



*** CID 1438474:  Control flow issues  (DEADCODE)
/include/rtl/stringutils.hxx: 176 in 
rtl::libreoffice_internal::ConstCharArrayDetector::isValid(const char (&)[1])()
170 static const bool ok = true;
171 #if defined LIBO_INTERNAL_ONLY && HAVE_CXX14_CONSTEXPR
172 constexpr
173 #endif
174 static bool isValid(char const (& literal)[N]) {
175 for (std::size_t i = 0; i != N - 1; ++i) {

 CID 1438474:  Control flow issues  (DEADCODE)
 Execution cannot reach this statement: "if ((*literal)[i] == 0) {

  ...".


who's being dumb here, me or Coverity?


176 if (literal[i] == '\0') {
177 return false;
178 }
179 }
180 return literal[N - 1] == '\0';
181 }

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2018-08-22 Thread scan-admin
Hi,

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

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


** CID 1438474:  Control flow issues  (DEADCODE)
/include/rtl/stringutils.hxx: 176 in 
rtl::libreoffice_internal::ConstCharArrayDetector::isValid(const char (&)[1])()



*** CID 1438474:  Control flow issues  (DEADCODE)
/include/rtl/stringutils.hxx: 176 in 
rtl::libreoffice_internal::ConstCharArrayDetector::isValid(const char (&)[1])()
170 static const bool ok = true;
171 #if defined LIBO_INTERNAL_ONLY && HAVE_CXX14_CONSTEXPR
172 constexpr
173 #endif
174 static bool isValid(char const (& literal)[N]) {
175 for (std::size_t i = 0; i != N - 1; ++i) {
>>> CID 1438474:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "if ((*literal)[i] == 0) {
 ...".
176 if (literal[i] == '\0') {
177 return false;
178 }
179 }
180 return literal[N - 1] == '\0';
181 }

** CID 1438473:  Control flow issues  (DEADCODE)
/include/rtl/stringutils.hxx: 176 in 
rtlunittest::libreoffice_internal::ConstCharArrayDetector::isValid(const char (&)[1])()



*** CID 1438473:  Control flow issues  (DEADCODE)
/include/rtl/stringutils.hxx: 176 in 
rtlunittest::libreoffice_internal::ConstCharArrayDetector::isValid(const char (&)[1])()
170 static const bool ok = true;
171 #if defined LIBO_INTERNAL_ONLY && HAVE_CXX14_CONSTEXPR
172 constexpr
173 #endif
174 static bool isValid(char const (& literal)[N]) {
175 for (std::size_t i = 0; i != N - 1; ++i) {
>>> CID 1438473:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "if ((*literal)[i] == 0) {
 ...".
176 if (literal[i] == '\0') {
177 return false;
178 }
179 }
180 return literal[N - 1] == '\0';
181 }



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyfh-2F2idhMgHMzCx4zBou-2BYC70xHMvajYyEcni2R2zaKIdPDNPI3b3nJ9NRLXEOU1nuDpEuximakh9R1jq9eVpTnsTccqY1uhB2BMZK5JuRW6rrxPiMwdaDz6PqAOAyy8q2TEMYSvaviRD3BL3ZMlqizvaM0mxQpA181RbwtsI0F4-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2018-08-18 Thread scan-admin
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 1438404:  Incorrect expression  (IDENTICAL_BRANCHES)
/sdext/source/presenter/PresenterFrameworkObserver.cxx: 102 in 
sdext::presenter::PresenterFrameworkObserver::notifyConfigurationChange(const 
com::sun::star::drawing::framework::ConfigurationChangeEvent &)()



*** CID 1438404:  Incorrect expression  (IDENTICAL_BRANCHES)
/sdext/source/presenter/PresenterFrameworkObserver.cxx: 102 in 
sdext::presenter::PresenterFrameworkObserver::notifyConfigurationChange(const 
com::sun::star::drawing::framework::ConfigurationChangeEvent &)()
96 void SAL_CALL PresenterFrameworkObserver::notifyConfigurationChange (
97 const ConfigurationChangeEvent& rEvent)
98 {
99 bool bDispose(false);
100 
101 Action aAction (maAction);
>>> CID 1438404:  Incorrect expression  (IDENTICAL_BRANCHES)
>>> The same code is executed regardless of whether "rEvent.Type == 
>>> "ConfigurationUpdateEnd"" is true, because the 'then' and 'else' branches 
>>> are identical. Should one of the branches be modified, or the entire 'if' 
>>> statement replaced?
102 if (rEvent.Type == "ConfigurationUpdateEnd")
103 {
104 Shutdown();
105 aAction(true);
106 bDispose = true;
107 }

** CID 1438403:  Error handling issues  (CHECKED_RETURN)
/sd/source/filter/eppt/pptx-epptooxml.cxx: 1175 in 
oox::core::PowerPointExport::WriteAnimationNodeAnimate(const 
std::shared_ptr &, const 
com::sun::star::uno::Reference &, 
int, bool)()



*** CID 1438403:  Error handling issues  (CHECKED_RETURN)
/sd/source/filter/eppt/pptx-epptooxml.cxx: 1175 in 
oox::core::PowerPointExport::WriteAnimationNodeAnimate(const 
std::shared_ptr &, const 
com::sun::star::uno::Reference &, 
int, bool)()
1169 OUString aPath;
1170 Reference xMotion(rXNode, UNO_QUERY);
1171 if (xMotion.is())
1172 {
1173 xMotion->getPath() >>= aPath;
1174 ::basegfx::B2DPolyPolygon aPolyPoly;
>>> CID 1438403:  Error handling issues  (CHECKED_RETURN)
>>> Calling "importFromSvgD" without checking return value (as is done 
>>> elsewhere 24 out of 26 times).
1175 ::basegfx::utils::importFromSvgD(aPolyPoly, aPath, true, 
nullptr);
1176 aPath = ::basegfx::utils::exportToSvgD(aPolyPoly, false, 
false, true, true);
1177 }
1178 
1179 pFS->startElementNS(XML_p, nXmlNodeType,
1180 XML_origin, "layout",

** CID 1438402:(NEGATIVE_RETURNS)



*** CID 1438402:(NEGATIVE_RETURNS)
/sc/source/filter/xml/xmlexprt.cxx: 1492 in ScXMLExport::OpenRow(int, int, int, 
ScXMLCachedRowAttrAccess &)()
1486 ++nEqualRows;
1487 else
1488 {
1489 if (nRow < nEndRow)
1490 {
1491 ScRowFormatRanges* pTempRowFormatRanges = new 
ScRowFormatRanges(pRowFormatRanges.get());
>>> CID 1438402:(NEGATIVE_RETURNS)
>>> "nPrevIndex" is passed to a parameter that cannot be negative.
1492 OpenAndCloseRow(nPrevIndex, nRow - nEqualRows, 
nEqualRows, bPrevHidden, bPrevFiltered);
1493 pRowFormatRanges.reset(pTempRowFormatRanges);
1494 }
1495 else
1496 OpenAndCloseRow(nPrevIndex, nRow - nEqualRows, 
nEqualRows, bPrevHidden, bPrevFiltered);
1497 nEqualRows = 1;
/sc/source/filter/xml/xmlexprt.cxx: 1504 in ScXMLExport::OpenRow(int, int, int, 
ScXMLCachedRowAttrAccess &)()
1498 nPrevIndex = nIndex;
1499 bPrevHidden = bHidden;
1500 bPrevFiltered = bFiltered;
1501 }
1502 }
1503 }
>>> CID 1438402:(NEGATIVE_RETURNS)
>>> "nPrevIndex" is passed to a parameter that cannot be negative.
1504 OpenNewRow(nPrevIndex, nRow - nEqualRows, nEqualRows, 
bPrevHidden, bPrevFiltered);
1505 }
1506 else
1507 {
1508 sal_Int32 nIndex = pRowStyles->GetStyleNameIndex(nTable, 
nStartRow);
1509 bool bHidden = false;

** CID 1438401:  Integer handling issues  (NEGATIVE_RETURNS)



New Defects reported by Coverity Scan for LibreOffice

2018-08-07 Thread scan-admin
Hi,

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

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


** CID 1438379:  Uninitialized members  (UNINIT_CTOR)
/sc/source/filter/xml/xmltransformationi.cxx: 639 in 
ScXMLDateTimeContext::ScXMLDateTimeContext(ScXMLImport &, const 
rtl::Reference &)()



*** CID 1438379:  Uninitialized members  (UNINIT_CTOR)
/sc/source/filter/xml/xmltransformationi.cxx: 639 in 
ScXMLDateTimeContext::ScXMLDateTimeContext(ScXMLImport &, const 
rtl::Reference &)()
633 maType = sc::DATETIME_TRANSFORMATION_TYPE::HOUR;
634 else if (aType == "minute")
635 maType = sc::DATETIME_TRANSFORMATION_TYPE::MINUTE;
636 else if (aType == "seconds")
637 maType = sc::DATETIME_TRANSFORMATION_TYPE::SECOND;
638 }
>>> CID 1438379:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "maType" is not initialized in this constructor 
>>> nor in any functions that it calls.
639 }
640 
641 ScXMLDateTimeContext::~ScXMLDateTimeContext()
642 {
643 ScDocument* pDoc = GetScImport().GetDocument();
644 auto& rDataSources = pDoc->GetExternalDataMapper().getDataSources();

** CID 1438378:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/include/tools/helpers.hxx: 82 in NormAngle180(T1)()



*** CID 1438378:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/include/tools/helpers.hxx: 82 in NormAngle180(T1)()
76 return fVal > 0.0 ? static_cast( fVal + 0.5 ) : 
-static_cast( -fVal + 0.5 );
77 }
78 
79 //valid range:  (-180,180]
80 template  inline SAL_WARN_UNUSED_RESULT T NormAngle180(T 
angle)
81 {
>>> CID 1438378:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
>>> "angle <= -180" is always false regardless of the values of its 
>>> operands. This occurs as the logical operand of "while".
82 while (angle <= -180)
83 angle += 360;
84 while (angle > 180)
85 angle -= 360;
86 return angle;
87 }



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyvkC2CIkFk3Tp9ed9X4jBJwu4ElZdGXWT9uRVrwKViIH3B6RtJjFYVVkFq9Lg69-2FhRQdXuqSiOjRSJCFcmBllJloVumRe5xLN8Uljd2KgETDgQao1sz2x2dF8mcEHmbwxnV6SrnKu6ydOb87umiMPPcQ0E6MgGiJcTDO2YOAMbHc-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2018-08-04 Thread scan-admin
Hi,

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

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


** CID 1438227:  Error handling issues  (NEGATIVE_RETURNS)
/desktop/source/splash/unxsplash.cxx: 98 in 
desktop::UnxSplashScreen::initialize(const 
com::sun::star::uno::Sequence &)()



*** CID 1438227:  Error handling issues  (NEGATIVE_RETURNS)
/desktop/source/splash/unxsplash.cxx: 98 in 
desktop::UnxSplashScreen::initialize(const 
com::sun::star::uno::Sequence &)()
92 OUString aArg;
93 osl_getCommandArg( i,  );
94 OUString aNum;
95 if ( aArg.startsWithIgnoreAsciiCase("--splash-pipe=", ) )
96 {
97 int fd = aNum.toInt32();
>>> CID 1438227:  Error handling issues  (NEGATIVE_RETURNS)
>>> "fd" is passed to a parameter that cannot be negative.
98 m_pOutFd = fdopen( fd, "w" );
99 SAL_INFO("desktop.splash", "Got argument '--splash-pipe=" << 
fd << " ('"
100 << aNum << "') ("
101 << static_cast(m_pOutFd) << ")");
102 }
103 }

** CID 1438226:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1438226:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/unocore/unochart.cxx: 425 in 
GetFormatAndCreateCursorFromRangeRep(const SwDoc *, const rtl::OUString &, 
SwFrameFormat **, std::shared_ptr &)()
419 pUnoCursor->SetMark();
420 pUnoCursor->GetPoint()->nNode = *pBRBox->GetSttNd();
421 pUnoCursor->Move( fnMoveForward, GoInNode );
422 SwUnoTableCursor* pCursor =
423 dynamic_cast(pUnoCursor.get());
424 // HACK: remove pending actions for old style tables
>>> CID 1438226:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pCursor" to "UnoActionRemoveContext", which 
>>> dereferences it.
425 UnoActionRemoveContext aRemoveContext(*pCursor);
426 pCursor->MakeBoxSels();
427 rpUnoCursor = pUnoCursor;
428 }
429 }
430 }

** CID 1438225:  Integer handling issues  (NEGATIVE_RETURNS)
/sw/source/core/tox/txmsrt.cxx: 677 in SwTOXAuthority::GetLevel() const()



*** CID 1438225:  Integer handling issues  (NEGATIVE_RETURNS)
/sw/source/core/tox/txmsrt.cxx: 677 in SwTOXAuthority::GetLevel() const()
671 OUString 
sText(static_cast(m_rField.GetField())->GetFieldText(AUTH_FIELD_AUTHORITY_TYPE));
672 //#i18655# the level '0' is the heading level therefore the values 
are incremented here
673 sal_uInt16 nRet = 1;
674 if( pTOXIntl->IsNumeric( sText ) )
675 {
676 nRet = static_cast(sText.toInt32());
>>> CID 1438225:  Integer handling issues  (NEGATIVE_RETURNS)
>>> Unsigned variable "nRet" is incremented, which might cause an integer 
>>> overflow.
677 nRet++;
678 }
679 //illegal values are also set to 'ARTICLE' as non-numeric values are
680 if(nRet > AUTH_TYPE_END)
681 nRet = 1;
682 return nRet;

** CID 1438224:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1438224:  Null pointer dereferences  (NULL_RETURNS)
/oox/source/drawingml/shape.cxx: 525 in 
oox::drawingml::lcl_createPresetShape(com::sun::star::uno::Reference
 &, const rtl::OUString &, const rtl::OUString &, 
std::shared_ptr, 
std::shared_ptr, const oox::GraphicHelper &)()
519 ParagraphAdjust eAdjust = ParagraphAdjust_LEFT;
520 if (pParagraph->getProperties().getParaAdjust())
521 eAdjust = 
pParagraph->getProperties().getParaAdjust().get();
522 xSet->setPropertyValue( "ParaAdjust", uno::makeAny( eAdjust 
) );
523 SvxShape* pShape = SvxShape::getImplementation( xShape );
524 SdrTextHorzAdjust eHorzAdjust = lcl_convertAdjust( eAdjust 
);
>>> CID 1438224:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be null "pShape" when calling 
>>> "GetSdrObject".
525 pShape->GetSdrObject()->SetMergedItem( 
SdrTextHorzAdjustItem( eHorzAdjust ) );
526 }
527 }
528 
529 // Apply preset shape
530 

New Defects reported by Coverity Scan for LibreOffice

2018-08-01 Thread scan-admin
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.
7 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 5 of 5 defect(s)


** CID 1438198:  API usage errors  (INVALIDATE_ITERATOR)
/editeng/source/editeng/impedit2.cxx: 1740 in 
ImpEditEngine::InitScriptTypes(int)()



*** CID 1438198:  API usage errors  (INVALIDATE_ITERATOR)
/editeng/source/editeng/impedit2.cxx: 1740 in 
ImpEditEngine::InitScriptTypes(int)()
1734 // Skip entries in ScriptArray which are not inside 
the RTL run:
1735 while ( nIdx < rTypes.size() && rTypes[nIdx].nStartPos 
< nStart )
1736 ++nIdx;
1737 
1738 // Remove any entries *inside* the current run:
1739 while ( nIdx < rTypes.size() && rTypes[nIdx].nEndPos 
<= nEnd )
>>> CID 1438198:  API usage errors  (INVALIDATE_ITERATOR)
>>> Using invalid iterator "std::vector>> std::allocator >::const_iterator(rTypes->begin() + 
>>> nIdx)".
1740 rTypes.erase( rTypes.begin()+nIdx );
1741 
1742 // special case:
1743 if(nIdx < rTypes.size() && rTypes[nIdx].nStartPos < 
nStart && rTypes[nIdx].nEndPos > nEnd)
1744 {
1745 rTypes.insert( rTypes.begin()+nIdx, 
ScriptTypePosInfo( rTypes[nIdx].nScriptType, nEnd, rTypes[nIdx].nEndPos ) );

** CID 1438197:(DEADCODE)
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1317 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const
 drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)()
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1329 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const
 drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)()



*** CID 1438197:(DEADCODE)
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1317 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const
 drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)()
1311 // the MetaActionType::POLYPOLYGON written by 
RenderPolygonHairlinePrimitive2D
1312 // below
1313 bool bSupportSvtGraphicStroke(false);
1314 
1315 if(bSupportSvtGraphicStroke)
1316 {
>>> CID 1438197:(DEADCODE)
>>> Execution cannot reach this statement: "pSvtGraphicStroke = this->i...".
1317 pSvtGraphicStroke = impTryToCreateSvtGraphicStroke(
1318 rHairlinePrimitive.getB2DPolygon(),
1319 ,
1320 nullptr, nullptr, nullptr, nullptr);
1321 
1322 impStartSvtGraphicStroke(pSvtGraphicStroke);
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1329 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolygonHairlinePrimitive2D(const
 drawinglayer::primitive2d::PolygonHairlinePrimitive2D &)()
1323 }
1324 
1325 RenderPolygonHairlinePrimitive2D(rHairlinePrimitive, 
false);
1326 
1327 if(bSupportSvtGraphicStroke)
1328 {
>>> CID 1438197:(DEADCODE)
>>> Execution cannot reach this statement: "this->impEndSvtGraphicStrok...".
1329 impEndSvtGraphicStroke(pSvtGraphicStroke);
1330 }
1331 }
1332 }
1333 
1334 void 
VclMetafileProcessor2D::processPolygonStrokePrimitive2D(const 
primitive2d::PolygonStrokePrimitive2D& rStrokePrimitive)

** CID 1438196:(DEADCODE)
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1792 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const
 drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)()
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1819 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const
 drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)()
/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx: 1826 in 
drawinglayer::processor2d::VclMetafileProcessor2D::processPolyPolygonColorPrimitive2D(const
 drawinglayer::primitive2d::PolyPolygonColorPrimitive2D &)()



*** CID 1438196:(DEADCODE)

New Defects reported by Coverity Scan for LibreOffice

2018-07-29 Thread scan-admin
Hi,

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

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


** CID 1438139:  Uninitialized members  (UNINIT_CTOR)
/sc/source/filter/xml/xmltransformationi.cxx: 289 in 
ScXMLColumnTextContext::ScXMLColumnTextContext(ScXMLImport &, const 
rtl::Reference &)()



*** CID 1438139:  Uninitialized members  (UNINIT_CTOR)
/sc/source/filter/xml/xmltransformationi.cxx: 289 in 
ScXMLColumnTextContext::ScXMLColumnTextContext(ScXMLImport &, const 
rtl::Reference &)()
283 maType = sc::TEXT_TRANSFORM_TYPE::TO_UPPER;
284 else if (aType == "capitalize")
285 maType = sc::TEXT_TRANSFORM_TYPE::CAPITALIZE;
286 else if (aType == "trim")
287 maType = sc::TEXT_TRANSFORM_TYPE::TRIM;
288 }
>>> CID 1438139:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "maType" is not initialized in this constructor 
>>> nor in any functions that it calls.
289 }
290 
291 ScXMLColumnTextContext::~ScXMLColumnTextContext()
292 {
293 ScDocument* pDoc = GetScImport().GetDocument();
294 auto& rDataSources = pDoc->GetExternalDataMapper().getDataSources();

** CID 1438138:  Uninitialized members  (UNINIT_CTOR)
/sc/source/filter/xml/xmltransformationi.cxx: 367 in 
ScXMLColumnAggregateContext::ScXMLColumnAggregateContext(ScXMLImport &, const 
rtl::Reference &)()



*** CID 1438138:  Uninitialized members  (UNINIT_CTOR)
/sc/source/filter/xml/xmltransformationi.cxx: 367 in 
ScXMLColumnAggregateContext::ScXMLColumnAggregateContext(ScXMLImport &, const 
rtl::Reference &)()
361 maType = sc::AGGREGATE_FUNCTION::AVERAGE;
362 else if (aType == "min")
363 maType = sc::AGGREGATE_FUNCTION::MIN;
364 else if (aType == "max")
365 maType = sc::AGGREGATE_FUNCTION::MAX;
366 }
>>> CID 1438138:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "maType" is not initialized in this constructor 
>>> nor in any functions that it calls.
367 }
368 
369 ScXMLColumnAggregateContext::~ScXMLColumnAggregateContext()
370 {
371 ScDocument* pDoc = GetScImport().GetDocument();
372 auto& rDataSources = pDoc->GetExternalDataMapper().getDataSources();

** CID 1438137:(UNINIT_CTOR)
/sc/source/filter/xml/xmltransformationi.cxx: 465 in 
ScXMLColumnNumberContext::ScXMLColumnNumberContext(ScXMLImport &, const 
rtl::Reference &)()
/sc/source/filter/xml/xmltransformationi.cxx: 465 in 
ScXMLColumnNumberContext::ScXMLColumnNumberContext(ScXMLImport &, const 
rtl::Reference &)()



*** CID 1438137:(UNINIT_CTOR)
/sc/source/filter/xml/xmltransformationi.cxx: 465 in 
ScXMLColumnNumberContext::ScXMLColumnNumberContext(ScXMLImport &, const 
rtl::Reference &)()
459 maType = sc::NUMBER_TRANSFORM_TYPE::IS_EVEN;
460 else if (aType == "odd")
461 maType = sc::NUMBER_TRANSFORM_TYPE::IS_ODD;
462 else if (aType == "sign")
463 maType = sc::NUMBER_TRANSFORM_TYPE::SIGN;
464 }
>>> CID 1438137:(UNINIT_CTOR)
>>> Non-static class member "maPrecision" is not initialized in this 
>>> constructor nor in any functions that it calls.
465 }
466 
467 ScXMLColumnNumberContext::~ScXMLColumnNumberContext()
468 {
469 ScDocument* pDoc = GetScImport().GetDocument();
470 auto& rDataSources = pDoc->GetExternalDataMapper().getDataSources();
/sc/source/filter/xml/xmltransformationi.cxx: 465 in 
ScXMLColumnNumberContext::ScXMLColumnNumberContext(ScXMLImport &, const 
rtl::Reference &)()
459 maType = sc::NUMBER_TRANSFORM_TYPE::IS_EVEN;
460 else if (aType == "odd")
461 maType = sc::NUMBER_TRANSFORM_TYPE::IS_ODD;
462 else if (aType == "sign")
463 maType = sc::NUMBER_TRANSFORM_TYPE::SIGN;
464 }
>>> CID 1438137:(UNINIT_CTOR)
>>> Non-static class member "maPrecision" is not initialized in this 
>>> constructor nor in any functions that it calls.
465 }
466 
467 ScXMLColumnNumberContext::~ScXMLColumnNumberContext()
468 {
469 ScDocument* pDoc = GetScImport().GetDocument();
470 auto& rDataSources = pDoc->GetExternalDataMapper().getDataSources();



New Defects reported by Coverity Scan for LibreOffice

2018-07-19 Thread scan-admin
Hi,

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

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


** CID 1438043:(DEADCODE)
/sw/source/core/layout/layact.cxx: 445 in 
SwLayAction::InternalAction(OutputDevice *)()
/sw/source/core/layout/layact.cxx: 448 in 
SwLayAction::InternalAction(OutputDevice *)()



*** CID 1438043:(DEADCODE)
/sw/source/core/layout/layact.cxx: 445 in 
SwLayAction::InternalAction(OutputDevice *)()
439 
440 IDocumentLayoutAccess& rLayoutAccess = 
m_pRoot->GetFormat()->getIDocumentLayoutAccess();
441 bool bNoLoop = pPage && SwLayouter::StartLoopControl( 
m_pRoot->GetFormat()->GetDoc(), pPage );
442 sal_uInt16 nPercentPageNum = 0;
443 while ( (pPage && !IsInterrupt()) || m_nCheckPageNum != USHRT_MAX )
444 {
>>> CID 1438043:(DEADCODE)
>>> Execution cannot reach the expression "pPage->GetPhyPageNum() >= 
>>> this->m_nCheckPageNum" inside this statement: "if (!pPage && 
>>> this->m_nChec...".
445 if ( !pPage && m_nCheckPageNum != USHRT_MAX &&
446  (!pPage || pPage->GetPhyPageNum() >= m_nCheckPageNum) )
447 {
448 if ( !pPage || pPage->GetPhyPageNum() > m_nCheckPageNum )
449 {
450 SwPageFrame *pPg = 
static_cast(m_pRoot->Lower());
/sw/source/core/layout/layact.cxx: 448 in 
SwLayAction::InternalAction(OutputDevice *)()
442 sal_uInt16 nPercentPageNum = 0;
443 while ( (pPage && !IsInterrupt()) || m_nCheckPageNum != USHRT_MAX )
444 {
445 if ( !pPage && m_nCheckPageNum != USHRT_MAX &&
446  (!pPage || pPage->GetPhyPageNum() >= m_nCheckPageNum) )
447 {
>>> CID 1438043:(DEADCODE)
>>> Execution cannot reach the expression "pPage->GetPhyPageNum() > 
>>> this->m_nCheckPageNum" inside this statement: "if (!pPage || 
>>> pPage->GetPhy...".
448 if ( !pPage || pPage->GetPhyPageNum() > m_nCheckPageNum )
449 {
450 SwPageFrame *pPg = 
static_cast(m_pRoot->Lower());
451 while ( pPg && pPg->GetPhyPageNum() < m_nCheckPageNum )
452 pPg = static_cast(pPg->GetNext());
453 if ( pPg )



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyaicp5raxBNRKMdrrCQSQrZBd26wIOlS495yuuhqd2DmKJELDyiPyCaNTVwiDTRBDRjo5qV1ZDbx9UnBpkNcK5-2FllXaGCndrpOMKzm0u3bnf3Yssfu14IAt9wNubS4rDzIxojtD-2FRKBvOgnfnlq6wEXNW6vb2q2gn5xAskYXDw2I-3D

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


New Defects reported by Coverity Scan for LibreOffice

2018-07-14 Thread scan-admin
Hi,

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

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


** CID 1437962:(RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1761 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword,
 bool, int)()
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1789 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword,
 bool, int)()
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1881 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword,
 bool, int)()



*** CID 1437962:(RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1761 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword,
 bool, int)()
1755 }
1756 if (nSprm >= 0)
1757 {
1758 auto pValue
1759 = new RTFValue((!bParam || nParam != 0) ? nSprm : 
NS_ooxml::LN_Value_ST_Underline_none);
1760 
m_aStates.top().aCharacterAttributes.set(NS_ooxml::LN_CT_Underline_val, pValue);
>>> CID 1437962:(RESOURCE_LEAK)
>>> Variable "pBoolValue" going out of scope leaks the storage it points to.
1761 return RTFError::OK;
1762 }
1763 
1764 // Accent characters (over dot / over comma).
1765 switch (nKeyword)
1766 {
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1789 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword,
 bool, int)()
1783 break;
1784 }
1785 if (nSprm >= 0)
1786 {
1787 auto pValue = new RTFValue((!bParam || nParam != 0) ? nSprm : 
0);
1788 
m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_em, pValue);
>>> CID 1437962:(RESOURCE_LEAK)
>>> Variable "pBoolValue" going out of scope leaks the storage it points to.
1789 return RTFError::OK;
1790 }
1791 
1792 // Trivial character sprms.
1793 switch (nKeyword)
1794 {
/writerfilter/source/rtftok/rtfdocumentimpl.cxx: 1881 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchToggle(writerfilter::rtftok::RTFKeyword,
 bool, int)()
1875 SAL_INFO("writerfilter.rtf",
1876  "TODO handle toggle '" << 
keywordToString(nKeyword) << "'");
1877 aSkip.setParsed(false);
1878 }
1879 break;
1880 }
>>> CID 1437962:(RESOURCE_LEAK)
>>> Variable "pBoolValue" going out of scope leaks the storage it points to.
1881 return RTFError::OK;
1882 }
1883 
1884 RTFError RTFDocumentImpl::pushState()
1885 {
1886 //SAL_INFO("writerfilter.rtf", OSL_THIS_FUNC << " before push: " 
<< m_pTokenizer->getGroup());

** CID 1437961:(RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 137 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword,
 int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 142 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword,
 int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 152 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword,
 int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 225 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword,
 int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 237 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword,
 int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 296 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword,
 int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 331 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword,
 int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 607 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword,
 int)()
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 1606 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword,
 int)()



*** CID 1437961:(RESOURCE_LEAK)
/writerfilter/source/rtftok/rtfdispatchvalue.cxx: 137 in 
writerfilter::rtftok::RTFDocumentImpl::dispatchValue(writerfilter::rtftok::RTFKeyword,
 int)()
131 nValue = NS_ooxml::LN_Value_ST_Jc_center;
132  

<    1   2   3   4   5   6   7   >