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.
40 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 1372446: Error handling issues (UNCAUGHT_EXCEPT)
/dbaccess/source/core/api/KeySet.cxx: 1187 in dbaccess::OKeySet::doTryRefetch_throw()()
________________________________________________________________________________________________________
*** CID 1372446: Error handling issues (UNCAUGHT_EXCEPT)
/dbaccess/source/core/api/KeySet.cxx: 1187 in dbaccess::OKeySet::doTryRefetch_throw()()
1181
1182 bool SAL_CALL OKeySet::previous( ) throw(SQLException, RuntimeException)
1183 {
1184 return previous_checked(true);
1185 }
1186
CID 1372446: Error handling issues (UNCAUGHT_EXCEPT)
An exception of type "std::length_error" is thrown but the throw list
"throw(com::sun::star::uno::RuntimeException, com::sun::star::sdbc::SQLException)" doesn't
allow it to be thrown. This will cause a call to unexpected() which usually calls terminate().
1187 bool OKeySet::doTryRefetch_throw() throw(SQLException, RuntimeException)
1188 {
1189 ensureStatement( );
1190 // we just reassign the base members
1191 Reference< XParameters > xParameter(m_xStatement,UNO_QUERY);
1192 OSL_ENSURE(xParameter.is(),"No Parameter interface!");
** CID 1372445: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/indexentry/indexentrysupplier_default.cxx: 254 in
com::sun::star::i18n::Index::init(const com::sun::star::lang::Locale &, const rtl::OUString &)()
________________________________________________________________________________________________________
*** CID 1372445: Error handling issues (UNCAUGHT_EXCEPT)
/i18npool/source/indexentry/indexentrysupplier_default.cxx: 254 in
com::sun::star::i18n::Index::init(const com::sun::star::lang::Locale &, const rtl::OUString &)()
248 mkeys[j] = k;
249 }
250 }
251 }
252 }
253
CID 1372445: Error handling issues (UNCAUGHT_EXCEPT)
An exception of type "std::length_error" is thrown but the throw list
"throw(com::sun::star::uno::RuntimeException)" doesn't allow it to be thrown. This will cause a
call to unexpected() which usually calls terminate().
254 void Index::init(const lang::Locale &rLocale, const OUString& algorithm) throw
(RuntimeException)
255 {
256 makeIndexKeys(rLocale, algorithm);
257
258 Sequence< UnicodeScript > scriptList = LocaleDataImpl::get()->getUnicodeScripts(
rLocale );
259
** CID 1372444: Null pointer dereferences (FORWARD_NULL)
/sw/source/core/layout/pagechg.cxx: 1020 in SwFrame::CheckPageDescs(SwPageFrame *, bool,
SwPageFrame **)()
________________________________________________________________________________________________________
*** CID 1372444: Null pointer dereferences (FORWARD_NULL)
/sw/source/core/layout/pagechg.cxx: 1020 in SwFrame::CheckPageDescs(SwPageFrame *, bool,
SwPageFrame **)()
1014 // Updating a page might take a while, so check the WaitCursor
1015 if( pImp )
1016 pImp->CheckWaitCursor();
1017
1018 // invalidate the field, starting from here
1019 if ( nDocPos == LONG_MAX )
CID 1372444: Null pointer dereferences (FORWARD_NULL)
Comparing "pPrevPage" to null implies that "pPrevPage" might be null.
1020 nDocPos = pPrevPage ? pPrevPage->Frame().Top() : pPage->Frame().Top();
1021
1022 // Cases:
1023 // 1. Empty page should be "normal" page -> remove empty page and take next
one
1024 // 2. Empty page should have different descriptor -> change
1025 // 3. Normal page should be empty -> insert empty page if previous page
** CID 1372443: Error handling issues (CHECKED_RETURN)
/sc/source/ui/docshell/docsh3.cxx: 1073 in ScDocShell::MergeDocument(ScDocument &, bool, bool,
unsigned long, std::unordered_map<unsigned long, unsigned long, std::hash<unsigned long>,
std::equal_to<unsigned long>, std::allocator<std::pair<const unsigned long, unsigned long>>> *,
bool)()
________________________________________________________________________________________________________
*** CID 1372443: Error handling issues (CHECKED_RETURN)
/sc/source/ui/docshell/docsh3.cxx: 1073 in ScDocShell::MergeDocument(ScDocument &, bool, bool,
unsigned long, std::unordered_map<unsigned long, unsigned long, std::hash<unsigned long>,
std::equal_to<unsigned long>, std::allocator<std::pair<const unsigned long, unsigned long>>> *,
bool)()
1067 }
1068 break;
1069 case SC_CAT_MOVE :
1070 {
1071 const ScChangeActionMove* pMove = static_cast<const
ScChangeActionMove*>(pSourceAction);
1072 ScRange aFromRange( pMove->GetFromRange().MakeRange() );
CID 1372443: Error handling issues (CHECKED_RETURN)
Calling "MoveBlock" without checking return value (as is done elsewhere 18 out of 21 times).
1073 GetDocFunc().MoveBlock( aFromRange,
1074 aSourceRange.aStart, true, true, false, false );
1075 }
1076 break;
1077 default:
1078 {
** CID 1372442: (CHECKED_RETURN)
/sc/qa/unit/ucalc_sharedformula.cxx: 1429 in Test::testSharedFormulaMoveBlock()()
/sc/qa/unit/ucalc_sharedformula.cxx: 1482 in Test::testSharedFormulaMoveBlock()()
________________________________________________________________________________________________________
*** CID 1372442: (CHECKED_RETURN)
/sc/qa/unit/ucalc_sharedformula.cxx: 1429 in Test::testSharedFormulaMoveBlock()()
1423 CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(1,2,0)));
1424
1425 clearFormulaCellChangedFlag(*m_pDoc, aFormulaRange);
1426
1427 // Move A1:A3 to D1:D3.
1428 ScDocFunc& rFunc = getDocShell().GetDocFunc();
CID 1372442: (CHECKED_RETURN)
Calling "MoveBlock" without checking return value (as is done elsewhere 18 out of 21 times).
1429 rFunc.MoveBlock(ScRange(0,0,0,0,2,0), ScAddress(3,0,0), true, true, false, true);
1430
1431 // The result should stay the same.
1432 CPPUNIT_ASSERT_EQUAL(1.0, m_pDoc->GetValue(ScAddress(1,0,0)));
1433 CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(1,1,0)));
1434 CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(1,2,0)));
/sc/qa/unit/ucalc_sharedformula.cxx: 1482 in Test::testSharedFormulaMoveBlock()()
1476 CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(1,1,0)));
1477 CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(1,2,0)));
1478 CPPUNIT_ASSERT_EQUAL(4.0, m_pDoc->GetValue(ScAddress(1,3,0)));
1479 CPPUNIT_ASSERT_EQUAL(5.0, m_pDoc->GetValue(ScAddress(1,4,0)));
1480
1481 // Move A1:A2 to D2:D3.
CID 1372442: (CHECKED_RETURN)
Calling "MoveBlock" without checking return value (as is done elsewhere 18 out of 21 times).
1482 rFunc.MoveBlock(ScRange(0,0,0,0,1,0), ScAddress(3,1,0), true, true, false, true);
1483
1484 // Check the formula values again. They should not change.
1485 CPPUNIT_ASSERT_EQUAL(1.0, m_pDoc->GetValue(ScAddress(1,0,0)));
1486 CPPUNIT_ASSERT_EQUAL(2.0, m_pDoc->GetValue(ScAddress(1,1,0)));
1487 CPPUNIT_ASSERT_EQUAL(3.0, m_pDoc->GetValue(ScAddress(1,2,0)));
** CID 1371321: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/sw/source/filter/ww8/ww8par.hxx: 215 in ()
________________________________________________________________________________________________________
*** CID 1371321: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/sw/source/filter/ww8/ww8par.hxx: 215 in ()
209 void ReadFull(sal_uInt8 nSprm29, SwWW8ImplReader* pIo);
210 void Read(sal_uInt8 nSprm29, WW8RStyle* pStyle);
211 void ApplyTabPos(const WW8_TablePos *pTabPos);
212 bool IsEmpty() const;
213 };
214
CID 1371321: Low impact quality (MISSING_MOVE_ASSIGNMENT)
Class "SwWW8StyInf" 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.
215 class SwWW8StyInf
216 {
217 OUString m_sWWStyleName;
218 sal_uInt16 m_nWWStyleId;
219 public:
220 rtl_TextEncoding m_eLTRFontSrcCharSet; // rtl_TextEncoding for the font
** CID 1371311: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/sc/inc/docoptio.hxx: 33 in ()
________________________________________________________________________________________________________
*** CID 1371311: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/sc/inc/docoptio.hxx: 33 in ()
27 #include "scdllapi.h"
28 #include "scmod.hxx"
29 #include "optutil.hxx"
30
31 #include <formula/grammar.hxx>
32
CID 1371311: Low impact quality (MISSING_MOVE_ASSIGNMENT)
Class "ScDocOptions" 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.
33 class SC_DLLPUBLIC ScDocOptions
34 {
35 double fIterEps; // epsilon value dazu
36 sal_uInt16 nIterCount; ///< number
37 sal_uInt16 nPrecStandardFormat; ///< precision for standard format
38 sal_uInt16 nDay; ///< Null date:
** CID 1371295: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/sw/inc/pam.hxx: 155 in ()
________________________________________________________________________________________________________
*** CID 1371295: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/sw/inc/pam.hxx: 155 in ()
149 SW_DLLPUBLIC bool GoInContent( SwPaM&, SwMoveFnCollection const &);
150 SW_DLLPUBLIC bool GoInContentCells( SwPaM&, SwMoveFnCollection const &);
151 SW_DLLPUBLIC bool GoInContentSkipHidden( SwPaM&, SwMoveFnCollection const &);
152 SW_DLLPUBLIC bool GoInContentCellsSkipHidden( SwPaM&, SwMoveFnCollection const &);
153
154 /// PaM is Point and Mark: a selection of the document model.
CID 1371295: Low impact quality (MISSING_MOVE_ASSIGNMENT)
Class "SwPaM" 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.
155 class SW_DLLPUBLIC SwPaM : public sw::Ring<SwPaM>
156 {
157 SwPosition m_Bound1;
158 SwPosition m_Bound2;
159 SwPosition * m_pPoint; ///< points at either m_Bound1 or m_Bound2
160 SwPosition * m_pMark; ///< points at either m_Bound1 or m_Bound2
** CID 1371269: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/sw/inc/numrule.hxx: 97 in ()
________________________________________________________________________________________________________
*** CID 1371269: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/sw/inc/numrule.hxx: 97 in ()
91 bool IsEnumeration() const; // #i22362#
92 bool IsItemize() const; // #i29560#
93 };
94
95 class SwPaM;
96 enum SwNumRuleType { OUTLINE_RULE = 0, NUM_RULE = 1, RULE_END = 2 };
CID 1371269: Low impact quality (MISSING_MOVE_ASSIGNMENT)
Class "SwNumRule" 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.
97 class SW_DLLPUBLIC SwNumRule
98 {
99
100 public:
101 typedef std::vector< SwTextNode* > tTextNodeList;
102 typedef std::vector< SwTextFormatColl* > tParagraphStyleList;
** CID 1371177: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/reportdesign/inc/reportformula.hxx: 35 in ()
________________________________________________________________________________________________________
*** CID 1371177: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/reportdesign/inc/reportformula.hxx: 35 in ()
29 namespace rptui
30 {
31
32
33 //= ReportFormula
34
CID 1371177: Low impact quality (MISSING_MOVE_ASSIGNMENT)
Class "rptui::ReportFormula" 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.
35 class REPORTDESIGN_DLLPUBLIC ReportFormula
36 {
37 public:
38 enum BindType
39 {
40 Expression,
** CID 1371151: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/basctl/source/inc/scriptdocument.hxx: 66 in ()
________________________________________________________________________________________________________
*** CID 1371151: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/basctl/source/inc/scriptdocument.hxx: 66 in ()
60
61 class ScriptDocument;
62 typedef ::std::vector< ScriptDocument > ScriptDocuments;
63
64 /** encapsulates a document which contains Basic scripts and dialogs
65 */
CID 1371151: Low impact quality (MISSING_MOVE_ASSIGNMENT)
Class "basctl::ScriptDocument" 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.
66 class ScriptDocument
67 {
68 private:
69 class Impl;
70 std::shared_ptr<Impl> m_pImpl;
71
** CID 707983: Uninitialized members (UNINIT_CTOR)
/sc/inc/compiler.hxx: 139 in ScRawToken::ScRawToken()()
________________________________________________________________________________________________________
*** CID 707983: Uninitialized members (UNINIT_CTOR)
/sc/inc/compiler.hxx: 139 in ScRawToken::ScRawToken()()
133 sal_uInt16 nError;
134 sal_Unicode cStr[ MAXSTRLEN+1 ]; // string (up to 255 characters + 0)
135 short nJump[ FORMULA_MAXJUMPCOUNT + 1 ]; // If/Chose token
136 };
137
138 //! members not initialized
CID 707983: Uninitialized members (UNINIT_CTOR)
Non-static class member "eType" is not initialized in this constructor nor in any functions
that it calls.
139 ScRawToken() {}
140 private:
141 ~ScRawToken() {} //! only delete via Delete()
142 public:
143 DECL_FIXEDMEMPOOL_NEWDEL( ScRawToken );
144 formula::StackVar GetType() const { return eType; }
________________________________________________________________________________________________________
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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpySDP7uSjQBRI7mAtitRJ-2F6lOzD40UUbUeWpX9FfCPO-2F1FQ3eFzYDvLNyD10SEqXe5h6y-2B9jXnRmVdvnkicmsWcs0xqA5rtQE-2BWO0bWIDHyn3yAmOB0eC5D8-2BI8L3YkAdiwoGg-2BCVnUvw3dO-2Fjt7frKECYdFTxbvq-2FKdZG7nRDLAQ-3D
To manage Coverity Scan email notifications for "libreoffice@lists.freedesktop.org", click
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4k1FZJSDV-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5N5X-2B1MAElavPQhH6nLwozJzqOkt2k8uOkYf2ZoppNa9QVe0T3fEZVQ7Kky1tOkLz_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpySDP7uSjQBRI7mAtitRJ-2F6p4Pyujy2a0WFlR-2FDdvnqOGr6pFvKdOkeWo3Ue9Jk7fwZDaHdy0Zo-2F9MohF-2FaotuiVM1rn83xBgowntIs14qd4W6M9xuNFoZrkM1RcTUw4G8rsumOnZ44CYTSmMI-2B0ExBGPMiexsFjLfqMEz2jZedMQ-3D
Context
- New Defects reported by Coverity Scan for LibreOffice · scan-admin
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.