New Defects reported by Coverity Scan for LibreOffice

2017-09-11 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 1417678:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/uibase/dbui/dbmgr.cxx: 805 in SwDBManager::~SwDBManager()()



*** CID 1417678:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/uibase/dbui/dbmgr.cxx: 805 in SwDBManager::~SwDBManager()()
799 , pImpl(new SwDBManager_Impl(*this))
800 , pMergeEvtSrc(nullptr)
801 , m_pDoc(pDoc)
802 {
803 }
804 
>>> CID 1417678:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::DeploymentException" 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().
805 SwDBManager::~SwDBManager()
806 {
807 RevokeLastRegistrations();
808 
809 // copy required, m_DataSourceParams can be modified while 
disposing components
810 std::vector> aCopiedConnections;

** CID 1078469:  Error handling issues  (CHECKED_RETURN)
/reportdesign/source/ui/inspection/GeometryHandler.cxx: 1899 in 
rptui::GeometryHandler::impl_isDefaultFunction_nothrow(const 
com::sun::star::uno::Reference &, 
rtl::OUString &, rtl::OUString &) const()



*** CID 1078469:  Error handling issues  (CHECKED_RETURN)
/reportdesign/source/ui/inspection/GeometryHandler.cxx: 1899 in 
rptui::GeometryHandler::impl_isDefaultFunction_nothrow(const 
com::sun::star::uno::Reference &, 
rtl::OUString &, rtl::OUString &) const()
1893 sal_Int32 start = 0;
1894 sal_Int32 end = sFormula.getLength();
1895 if ( aTextSearch.SearchForward(sFormula,&start,&end) && 
start == 0 && end == sFormula.getLength()) // default function found
1896 {
1897 aSearchOptions.searchString = 
"\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]";
1898 utl::TextSearch aDataSearch( aSearchOptions);
>>> CID 1078469:  Error handling issues  (CHECKED_RETURN)
>>> Calling "SearchForward" without checking return value (as is done 
>>> elsewhere 20 out of 25 times).
1899 aDataSearch.SearchForward(sFormula,&start,&end );
1900 ++start;
1901 _rDataField = sFormula.copy(start,end-start-1);
1902 _rsDefaultFunctionName = aIter->m_sName;
1903 break;
1904 }



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy2qWdtUsJf5fe18Sf2m7v2a7mVo5Djp6ZB1Dvuk1bdOiShrFLckprT8FAJNm-2FYVtWjWCW4S7u2m6yqGwWakpq8eqyouAk-2Fi6BH9s7pHvRCd4uqNCVEZPCoUdfxXwxUm8rpVSCE8zqJ7cJK2Ik4t4FORAv2VhG4uk3xgQnJ-2BYh6Ck-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-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy2qWdtUsJf5fe18Sf2m7v2b5YLdN1BxyJmusGLsCZqitEPJmdxciRSNbPuQ8YmtIkmnw01Q3UpGR8Lu1SuSLUKcSBXWaQs-2B9Q6mltlw1nev6bInseqI6VPOQbcxA5LbCK6RcDWIpFb5KRaYW6dlvN4Clz5Y-2BKyZ0POZptv02gyts-3D

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


New Defects reported by Coverity Scan for LibreOffice

2016-10-13 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.
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 4 of 4 defect(s)


** CID 1373665:  Incorrect expression  (USELESS_CALL)



*** CID 1373665:  Incorrect expression  (USELESS_CALL)
/vcl/source/control/combobox.cxx: 172 in ComboBox::ImplInit(vcl::Window *, 
long)()
166 m_pImpl->m_nDDHeight = 
sal::static_int_cast(nNCHeight);
167 }
168 }
169 
170 void ComboBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
171 {
>>> CID 1373665:  Incorrect expression  (USELESS_CALL)
>>> Calling "ComboBox::ImplInitStyle(nStyle)" is only useful for its return 
>>> value, which is ignored.
172 ImplInitStyle( nStyle );
173 
174 bool bNoBorder = ( nStyle & WB_NOBORDER ) != 0;
175 if ( !(nStyle & WB_DROPDOWN) )
176 {
177 nStyle &= ~WB_BORDER;

** CID 1373664:  Uninitialized members  (UNINIT_CTOR)
/cui/source/tabpages/tabarea.cxx: 89 in 
SvxAreaTabDialog::SvxAreaTabDialog(vcl::Window *, const SfxItemSet *, SdrModel 
*, bool)()



*** CID 1373664:  Uninitialized members  (UNINIT_CTOR)
/cui/source/tabpages/tabarea.cxx: 89 in 
SvxAreaTabDialog::SvxAreaTabDialog(vcl::Window *, const SfxItemSet *, SdrModel 
*, bool)()
83 m_nTransparenceTabPage = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", 
SvxTransparenceTabPage::Create,  nullptr);
84 
85 SetCurPageId( "RID_SVXPAGE_AREA" );
86 
87 CancelButton& rBtnCancel = GetCancelButton();
88 rBtnCancel.SetClickHdl( LINK( this, SvxAreaTabDialog, CancelHdlImpl 
) );
>>> CID 1373664:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mbAreaTP" is not initialized in this 
>>> constructor nor in any functions that it calls.
89 }
90 
91 void SvxAreaTabDialog::SavePalettes()
92 {
93 SfxObjectShell* pShell = SfxObjectShell::Current();
94 if( mpNewColorList != mpDrawModel->GetColorList() )

** CID 1373663:  Insecure data handling  (TAINTED_SCALAR)
/comphelper/source/misc/backupfilehelper.cxx: 434 in 
::ExtensionInfo::read_entries(std::shared_ptr &)()



*** CID 1373663:  Insecure data handling  (TAINTED_SCALAR)
/comphelper/source/misc/backupfilehelper.cxx: 434 in 
::ExtensionInfo::read_entries(std::shared_ptr &)()
428 
429 if (!read_sal_uInt32(rFile, nExtEntries))
430 {
431 return false;
432 }
433 
>>> CID 1373663:  Insecure data handling  (TAINTED_SCALAR)
>>> Using tainted variable "nExtEntries" as a loop boundary.
434 for (sal_uInt32 a(0); a < nExtEntries; a++)
435 {
436 ExtensionInfoEntry aNewEntry;
437 
438 if (aNewEntry.read_entry(rFile))
439 {

** CID 1373662:  Insecure data handling  (TAINTED_SCALAR)
/vcl/source/control/listbox.cxx: 201 in ListBox::ImplLoadRes()()



*** CID 1373662:  Insecure data handling  (TAINTED_SCALAR)
/vcl/source/control/listbox.cxx: 201 in ListBox::ImplLoadRes()()
195 
196 // The resource short is actually to be treated as unsigned short.
197 sal_uInt16 nResPos = static_cast(ReadShortRes());
198 sal_Int32 nSelPos = (nResPos == SAL_MAX_UINT16) ? 
LISTBOX_ENTRY_NOTFOUND : nResPos;
199 sal_Int32 nNumber = ReadLongRes();
200 
>>> CID 1373662:  Insecure data handling  (TAINTED_SCALAR)
>>> Using tainted variable "nNumber" as a loop boundary.
201 for( sal_Int32 i = 0; i < nNumber; i++ )
202 {
203 sal_Int32 nPos = InsertEntry( ReadStringRes() );
204 
205 sal_IntPtr nId = ReadLongRes();
206 if( nId )



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyGRQLPsJ4rfZ-2ByhtOe45xVen5IFJTX9GobMUFZVAWOdSOxMcf0lACl6ypuFtSyV1ORh8uYNLmyLPBSEB0Ze0adiUX7elBQRQPqUDRsQo9XMtk-2Bnq09mVoYwz1zQY9kogEj78e5Qfhn55k0RXgTL-2FLdBhpUbsL0E-2BkS8WErta45Sk-3D

To manage Coverity Scan email notifications for 
"libreoffice@lis

New Defects reported by Coverity Scan for LibreOffice

2016-10-18 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 1374076:  Error handling issues  (UNCAUGHT_EXCEPT)
/xmlsecurity/source/pdfio/pdfverify.cxx: 25 in main()



*** CID 1374076:  Error handling issues  (UNCAUGHT_EXCEPT)
/xmlsecurity/source/pdfio/pdfverify.cxx: 25 in main()
19 #include 
20 
21 #include 
22 
23 using namespace com::sun::star;
24 
>>> CID 1374076:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type 
>>> "std::length_error" is thrown and never caught.
25 SAL_IMPLEMENT_MAIN_WITH_ARGS(nArgc, pArgv)
26 {
27 if (nArgc < 2)
28 {
29 SAL_WARN("xmlsecurity.pdfio", "not enough parameters");
30 return 1;

** CID 1374075:  Error handling issues  (UNCAUGHT_EXCEPT)
/xmlsecurity/source/pdfio/pdfverify.cxx: 25 in main()



*** CID 1374075:  Error handling issues  (UNCAUGHT_EXCEPT)
/xmlsecurity/source/pdfio/pdfverify.cxx: 25 in main()
19 #include 
20 
21 #include 
22 
23 using namespace com::sun::star;
24 
>>> CID 1374075:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type 
>>> "com::sun::star::uno::DeploymentException" is thrown and never caught.
25 SAL_IMPLEMENT_MAIN_WITH_ARGS(nArgc, pArgv)
26 {
27 if (nArgc < 2)
28 {
29 SAL_WARN("xmlsecurity.pdfio", "not enough parameters");
30 return 1;

** CID 1374074:  Error handling issues  (UNCAUGHT_EXCEPT)
/xmlsecurity/source/pdfio/pdfverify.cxx: 25 in main()



*** CID 1374074:  Error handling issues  (UNCAUGHT_EXCEPT)
/xmlsecurity/source/pdfio/pdfverify.cxx: 25 in main()
19 #include 
20 
21 #include 
22 
23 using namespace com::sun::star;
24 
>>> CID 1374074:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type 
>>> "com::sun::star::uno::RuntimeException" is thrown and never caught.
25 SAL_IMPLEMENT_MAIN_WITH_ARGS(nArgc, pArgv)
26 {
27 if (nArgc < 2)
28 {
29 SAL_WARN("xmlsecurity.pdfio", "not enough parameters");
30 return 1;



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpypJRiS-2Ffco4aZgEEt3h7hV1FEUazA-2FE1qUDJjgBNuY-2BFKnTKWslxsN87NACkg6USGeTcbinhhv6dMZFQfxV1PRdJ2o-2F-2Fb9D-2FF3O1h7bD-2BYTuT3WeZfTwQbmB63OBjVJZdNO2l6Z95gvB26Y1QQqHKHzTNwIO8YJ-2B7wxGC9QfFSYM-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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpypJRiS-2Ffco4aZgEEt3h7hV2v3IiBFEXKGMVtn-2FalCs79BmZe5005xvk6wNlDkBK1lqBRCKFbemwaH-2Fu8tZ7H-2FyA3cvyYdzNbked7msuzCUW6m0TzUnH5i0eLkwBhl8fSiJdYF-2BezMUWsf1QIHWO2Ut4eSiumF4rYWI3bOeiWwhRM-3D

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


New Defects reported by Coverity Scan for LibreOffice

2016-10-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.
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 5 of 5 defect(s)


** CID 1374093:  Control flow issues  (UNREACHABLE)
/xmlsecurity/source/pdfio/pdfdocument.cxx: 1419 in 
xmlsecurity::pdfio::PDFDocument::ValidateSignature(SvStream &, 
xmlsecurity::pdfio::PDFObjectElement *, SignatureInformation &)()



*** CID 1374093:  Control flow issues  (UNREACHABLE)
/xmlsecurity/source/pdfio/pdfdocument.cxx: 1419 in 
xmlsecurity::pdfio::PDFDocument::ValidateSignature(SvStream &, 
xmlsecurity::pdfio::PDFObjectElement *, SignatureInformation &)()
1413 NSS_CMSSignerInfo_Destroy(pCMSSignerInfo);
1414 
1415 return true;
1416 #endif
1417 
1418 // Not implemented.
>>> CID 1374093:  Control flow issues  (UNREACHABLE)
>>> This code cannot be reached: "(void)rStream;".
1419 (void)rStream;
1420 (void)rInformation;
1421 
1422 return false;
1423 }
1424 

** CID 1374092:  Control flow issues  (UNREACHABLE)
/xmlsecurity/source/pdfio/pdfdocument.cxx: 620 in 
xmlsecurity::pdfio::PDFDocument::Sign(const 
com::sun::star::uno::Reference &)()



*** CID 1374092:  Control flow issues  (UNREACHABLE)
/xmlsecurity/source/pdfio/pdfdocument.cxx: 620 in 
xmlsecurity::pdfio::PDFDocument::Sign(const 
com::sun::star::uno::Reference &)()
614 NSS_CMSMessage_Destroy(pCMSMessage);
615 
616 return true;
617 #endif
618 
619 // Not implemented.
>>> CID 1374092:  Control flow issues  (UNREACHABLE)
>>> This code cannot be reached: "(void)pDerEncoded;".
620 (void)pDerEncoded;
621 (void)nDerEncoded;
622 
623 return false;
624 }
625 

** CID 1374091:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/vcl/source/gdi/CommonSalLayout.cxx: 105 in scaleHbFont(hb_font_t *, const 
FontSelectPattern &)()



*** CID 1374091:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/vcl/source/gdi/CommonSalLayout.cxx: 105 in scaleHbFont(hb_font_t *, const 
FontSelectPattern &)()
99 return pHbFont;
100 }
101 
102 static void scaleHbFont(hb_font_t* pHbFont, const FontSelectPattern& 
aFontSelData)
103 {
104 uint64_t nXScale = aFontSelData.mnWidth << 6;
>>> CID 1374091:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
>>> Potentially overflowing expression "aFontSelData.mnHeight << 6" with 
>>> type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then 
>>> used in a context that expects an expression of type "uint64_t" (64 bits, 
>>> unsigned).
105 uint64_t nYScale = aFontSelData.mnHeight << 6;
106 
107 #if defined(_WIN32)
108 // HACK to get stretched/shrunken text. TODO: Get rid of HACK
109 if (nXScale)
110 nXScale = double(nXScale) * 1.812;

** CID 1374090:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/vcl/source/gdi/CommonSalLayout.cxx: 104 in scaleHbFont(hb_font_t *, const 
FontSelectPattern &)()



*** CID 1374090:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
/vcl/source/gdi/CommonSalLayout.cxx: 104 in scaleHbFont(hb_font_t *, const 
FontSelectPattern &)()
98 
99 return pHbFont;
100 }
101 
102 static void scaleHbFont(hb_font_t* pHbFont, const FontSelectPattern& 
aFontSelData)
103 {
>>> CID 1374090:  Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
>>> Potentially overflowing expression "aFontSelData.mnWidth << 6" with 
>>> type "int" (32 bits, signed) is evaluated using 32-bit arithmetic, and then 
>>> used in a context that expects an expression of type "uint64_t" (64 bits, 
>>> unsigned).
104 uint64_t nXScale = aFontSelData.mnWidth << 6;
105 uint64_t nYScale = aFontSelData.mnHeight << 6;
106 
107 #if defined(_WIN32)
108 // HACK to get stretched/shrunken text. TODO: Get rid of HACK
109 if (nXScale)

** CID 1374089:  Error handling issues  (CHECKED_RETURN)
/comphelper/source/misc/backupfilehelper.cxx: 1694 in 
comphelper::BackupFileHelper::getInitialBaseURL()()



*** CID 1374089:  Error handling issues  (CHECKED_RETURN)
/comphelper/source/misc/backupfilehelper.cxx: 1694 in 
comphelper::BackupFileHelper::getInitialBaseURL()()
1688

New Defects reported by Coverity Scan for LibreOffice

2017-08-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.
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 1416669:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/dataprovider/dataprovider.cxx: 65 in 
sc::ExternalDataSource::ExternalDataSource(const rtl::OUString &, const 
rtl::OUString &, ScDocument *)()



*** CID 1416669:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/dataprovider/dataprovider.cxx: 65 in 
sc::ExternalDataSource::ExternalDataSource(const rtl::OUString &, const 
rtl::OUString &, ScDocument *)()
59 ExternalDataSource::ExternalDataSource(const OUString& rURL,
60 const OUString& rProvider, ScDocument* pDoc):
61 maURL(rURL),
62 maProvider(rProvider),
63 mpDoc(pDoc)
64 {
>>> CID 1416669:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mnUpdateFrequency" is not initialized in this 
>>> constructor nor in any functions that it calls.
65 }
66 
67 ExternalDataSource::~ExternalDataSource()
68 {
69 }
70 

** CID 1416668:  Error handling issues  (UNCAUGHT_EXCEPT)
/vcl/source/salmain/salmain.cxx: 35 in main()



*** CID 1416668:  Error handling issues  (UNCAUGHT_EXCEPT)
/vcl/source/salmain/salmain.cxx: 35 in main()
29 #include "salinst.hxx"
30 
31 #if defined( UNX ) && !defined MACOSX && !defined IOS && !defined 
ANDROID && !defined LIBO_HEADLESS
32 #include "opengl/x11/glxtest.hxx"
33 #endif
34 
>>> CID 1416668:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type 
>>> "com::sun::star::uno::RuntimeException" is thrown and never caught.
35 SAL_IMPLEMENT_MAIN() {
36 #if defined( UNX ) && !defined MACOSX && !defined IOS && !defined 
ANDROID && !defined LIBO_HEADLESS
37 fire_glxtest_process();
38 #endif
39 tools::extendApplicationEnvironment();
40 vclmain::createApplication();
41 return SVMain();
42 }
43 

** CID 1416667:(FORWARD_NULL)
/sw/qa/extras/ww8export/ww8export2.cxx: 62 in 
testTdf55427_footnote2endnote::verify()()
/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx: 603 in 
testTdf55427_footnote2endnote::verify()()



*** CID 1416667:(FORWARD_NULL)
/sw/qa/extras/ww8export/ww8export2.cxx: 62 in 
testTdf55427_footnote2endnote::verify()()
56 {
57 uno::Reference 
xPageStyle(getStyles("ParagraphStyles")->getByName("Footnote"), uno::UNO_QUERY);
58 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Footnote style is rose color", 
sal_Int32(0xFF007F), getProperty< sal_Int32 >(xPageStyle, "CharColor") );
59 xPageStyle.set(getStyles("ParagraphStyles")->getByName("Endnote"), 
uno::UNO_QUERY);
60 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Endnote style is cyan3 color", 
sal_Int32(0x2BD0D2), getProperty< sal_Int32 >(xPageStyle, "CharColor") );
61 
>>> CID 1416667:(FORWARD_NULL)
>>> Assigning: "pTextDoc" = "dynamic_cast >> *>(this->mxComponent.get())".
62 SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
63 SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
64 // The footnote numbering type of ARABIC will not transfer over when 
those footnotes are converted to endnotes.
65 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Footnote numbering type", 
SVX_NUM_ARABIC, pDoc->GetFootnoteInfo().aFormat.GetNumberingType() );
66 // The original document has a real endnote using ROMAN_LOWER 
numbering, so that setting MUST remain unchanged.
67 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Endnote numbering type", 
SVX_NUM_ROMAN_LOWER, pDoc->GetEndNoteInfo().aFormat.GetNumberingType() );
/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx: 603 in 
testTdf55427_footnote2endnote::verify()()
597 {
598 uno::Reference 
xPageStyle(getStyles("ParagraphStyles")->getByName("Footnote"), uno::UNO_QUERY);
599 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Footnote style is rose color", 
sal_Int32(0xFF007F), getProperty< sal_Int32 >(xPageStyle, "CharColor") );
600 xPageStyle.set(getStyles("ParagraphStyles")->getByName("Endnote"), 
uno::UNO_QUERY);
601 CPPUNIT_ASSERT_EQUAL_MESSAGE( "Endnote style is cyan3 color", 
sal_Int32(0x2BD0D2), getProperty< sal_Int32 >(xPageStyle, "CharColor") );
602 
>>> CID 1416667:(FORWARD_NULL)
>>> Assigning: "pTextDoc" = "dynamic_cast >> *>(this->mxComponent.get())".
603 SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
604  

New Defects reported by Coverity Scan for LibreOffice

2017-08-26 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.
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 4 of 4 defect(s)


** CID 1416886:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx: 1002 in 
testWatermarkLayer::verify()()



*** CID 1416886:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx: 1002 in 
testWatermarkLayer::verify()()
996 }
997 
998 DECLARE_OOXMLEXPORT_TEST(testWatermarkLayer, "watermark-layer.docx")
999 {
1000 // Watermark was not visible if page background was set.
1001 
>>> CID 1416886:  Null pointer dereferences  (FORWARD_NULL)
>>> Assigning: "pTextDoc" = "dynamic_cast >> *>(this->mxComponent.get())".
1002 SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
1003 SdrPage* pPage = 
pTextDoc->GetDocShell()->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
1004 SdrObject* pObject = pPage->GetObj(0);
1005 
1006 CPPUNIT_ASSERT(pObject);
1007 CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pObject->GetLayer().get());

** CID 1416885:(NEGATIVE_RETURNS)



*** CID 1416885:(NEGATIVE_RETURNS)
/sc/source/ui/docshell/externalrefmgr.cxx: 2335 in 
ScExternalRefManager::getRangeNameTokensFromSrcDoc(unsigned short, const 
ScDocument *, rtl::OUString &)()
2329 switch (pToken->GetType())
2330 {
2331 case svSingleRef:
2332 {
2333 const ScSingleRefData& rRef = *pToken->GetSingleRef();
2334 OUString aTabName;
>>> CID 1416885:(NEGATIVE_RETURNS)
>>> "rRef->Tab()" is passed to a parameter that cannot be negative.
2335 pSrcDoc->GetName(rRef.Tab(), aTabName);
2336 ScExternalSingleRefToken aNewToken(nFileId, 
svl::SharedString( aTabName),   // string not interned
2337 *pToken->GetSingleRef());
2338 pNew->AddToken(aNewToken);
2339 bTokenAdded = true;
2340 }
/sc/source/ui/docshell/externalrefmgr.cxx: 2346 in 
ScExternalRefManager::getRangeNameTokensFromSrcDoc(unsigned short, const 
ScDocument *, rtl::OUString &)()
2340 }
2341 break;
2342 case svDoubleRef:
2343 {
2344 const ScSingleRefData& rRef = *pToken->GetSingleRef();
2345 OUString aTabName;
>>> CID 1416885:(NEGATIVE_RETURNS)
>>> "rRef->Tab()" is passed to a parameter that cannot be negative.
2346 pSrcDoc->GetName(rRef.Tab(), aTabName);
2347 ScExternalDoubleRefToken aNewToken(nFileId, 
svl::SharedString( aTabName),   // string not interned
2348 *pToken->GetDoubleRef());
2349 pNew->AddToken(aNewToken);
2350 bTokenAdded = true;
2351 }

** CID 1416884:  Memory - corruptions  (OVERRUN)



*** CID 1416884:  Memory - corruptions  (OVERRUN)
/toolkit/source/awt/vclxtoolkit.cxx: 1112 in 
::VCLXToolkit::ImplCreateWindow(VCLXWindow **, const 
com::sun::star::awt::WindowDescriptor &, vcl::Window *, long, MessBoxStyle)()
1106 if (xSystemDepParent.is())
1107 {
1108 sal_Int8 processID[16];
1109 
1110 rtl_getGlobalProcessId( 
reinterpret_cast(processID) );
 
>>> CID 1416884:  Memory - corruptions  (OVERRUN)
>>> Overrunning array "processID" of 2 8-byte elements by passing it to a 
>>> function which accesses it at element index 15 (byte offset 120) using 
>>> argument "16".
1112 css::uno::Sequence 
processIdSeq(processID, 16);
1113 
1114 css::uno::Any anyHandle = 
xSystemDepParent->getWindowHandle(processIdSeq, SYSTEM_DEPENDENT_TYPE);
1115 
1116 // use sal_Int64 here to accommodate 
all int types
1117 // uno::Any shift operator whill 
upcast if necessary

** CID 1416883:(USELESS_CALL)



*** CID 1416883:(USELESS_CALL)
/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx: 955 in testWatermark::ver

New Defects reported by Coverity Scan for LibreOffice

2017-09-03 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 1417293:  Possible Control flow issues  (DEADCODE)
/filter/source/msfilter/eschesdo.cxx: 614 in 
ImplEESdrWriter::ImplWriteShape(ImplEESdrObject &, EscherSolverContainer &, 
bool)()



*** CID 1417293:  Possible Control flow issues  (DEADCODE)
/filter/source/msfilter/eschesdo.cxx: 614 in 
ImplEESdrWriter::ImplWriteShape(ImplEESdrObject &, EscherSolverContainer &, 
bool)()
608 aPropOpt.AddOpt( ESCHER_Prop_hspMaster, 0 );
609 }
610 else
611 {
612 //2do: could be made an option in HostAppData whether 
OLE object should be written or not
613 bool bAppOLE = true;
>>> CID 1417293:  Possible Control flow issues  (DEADCODE)
>>> Execution cannot reach the expression "ShapeFlag::NONE" inside this 
>>> statement: "addShape(75, (o3tl::is_type...".
614 addShape( ESCHER_ShpInst_PictureFrame,
615 ShapeFlag::HaveShapeProperty | 
ShapeFlag::HaveAnchor | (bAppOLE ? ShapeFlag::OLEShape : ShapeFlag::NONE) );
616 if ( aPropOpt.CreateOLEGraphicProperties( 
rObj.GetShapeRef() ) )
617 {
618 if ( bAppOLE )
619 {   // snooped from Xcl hex dump, nobody knows the 
trouble I have seen

** CID 1399392:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/doc/list.cxx: 99 in SwListImpl::~SwListImpl()()



*** CID 1399392:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/doc/list.cxx: 99 in SwListImpl::~SwListImpl()()
93 pNode = rNodes[nIndex];
94 }
95 }
96 while ( pNode != &rNodes.GetEndOfContent() );
97 }
98 
>>> CID 1399392:  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().
99 SwListImpl::~SwListImpl()
100 {
101 tListTrees::iterator aNumberTreeIter;
102 for ( aNumberTreeIter = maListTrees.begin();
103   aNumberTreeIter != maListTrees.end();
104   ++aNumberTreeIter )



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyLaWi5RDWzLUOtSPr5Wfjo-2BrrSyRB-2FVRUkzs8dblygNPH7X9vTGsU3KvBWLkt1MgesMsTRWortyCEcOhdYO05ceiexkKqyAAa0JqBV5kRo7fz2uuUiRMbtu2YRoMR7Kz5-2Bi7turNrXxZBLvv-2BbKHl-2Bx6EK924YOCGG-2BnScRtSS34-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-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyLaWi5RDWzLUOtSPr5Wfjo0qnUxPay-2FbNb3QIsn-2F8iv-2B50qIDzxegAAJn8XSx7LytUINoBsVG7SQbJcFYPkaioRjUec8pgmUlxOBh6UexXm6YH0Qdl9wR5s4AYd0w8hiQqnIfbLOhsXlBzoVKTUaevSZpQ6SD3dtt5v7UonX454E-3D

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


New Defects reported by Coverity Scan for LibreOffice

2016-08-27 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.
29 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 1371225:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/usr/include/librevenge-0.0/librevenge/RVNGPropertyList.h: 38 in ()



*** CID 1371225:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
/usr/include/librevenge-0.0/librevenge/RVNGPropertyList.h: 38 in ()
32 // the world.. yes, this is quite annoying.
33 
34 class RVNGPropertyListImpl;
35 class RVNGPropertyListIterImpl;
36 class RVNGPropertyListVector;
37 
>>> CID 1371225:  Low impact quality  (MISSING_MOVE_ASSIGNMENT)
>>> Class "librevenge::RVNGPropertyList" 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.
38 class REVENGE_API RVNGPropertyList
39 {
40 public:
41  RVNGPropertyList();
42  RVNGPropertyList(const RVNGPropertyList &);
43  virtual ~RVNGPropertyList();



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyA8R5XD6-2Bnz6B12FpkVLYf7dzpS0fbYQ-2BWXbgK62i4ErAvQiysi42D8UiJKTDsHoM1VvkeWZ77S8aco5b7VoIplxWSK0gjdDZmHTHDBawsrFc5VTDoDpY-2Br-2FQs42-2BfkQ8AMV-2BEphRZEG9g5HcQsmJH8uomwdOvaWwQsYAx56rXDQ-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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyA8R5XD6-2Bnz6B12FpkVLYf-2FHu3PrSxcMs0vWoW-2BjiED8oAeEiqFTNuAUh1oGsMA4Gh2wJEJ2877phUYw1F2J5f47tTA2YnBp9s7jKKfQXU-2Bp3Mi2evtvt0dni2DB9xaucRC5gTVeY5M8y3LILXdD3KlFu-2BlaJDlHVhqHGmOPUUw8-3D

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


New Defects reported by Coverity Scan for LibreOffice

2016-08-31 Thread scan-admin

Hi,

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

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


** CID 1372406:(UNCAUGHT_EXCEPT)
/connectivity/source/commontools/dbtools.cxx: 1789 in 
dbtools::setObjectWithInfo(const 
com::sun::star::uno::Reference &, int, const 
connectivity::ORowSetValue &, int, int)()
/connectivity/source/commontools/dbtools.cxx: 1789 in 
dbtools::setObjectWithInfo(const 
com::sun::star::uno::Reference &, int, const 
connectivity::ORowSetValue &, int, int)()
/connectivity/source/commontools/dbtools.cxx: 1789 in 
dbtools::setObjectWithInfo(const 
com::sun::star::uno::Reference &, int, const 
connectivity::ORowSetValue &, int, int)()



*** CID 1372406:(UNCAUGHT_EXCEPT)
/connectivity/source/commontools/dbtools.cxx: 1789 in 
dbtools::setObjectWithInfo(const 
com::sun::star::uno::Reference &, int, const 
connectivity::ORowSetValue &, int, int)()
1783 {
1784 ORowSetValue aVal;
1785 aVal.fill(x);
1786 setObjectWithInfo(_xParams,parameterIndex,aVal,sqlType,scale);
1787 }
1788 
>>> CID 1372406:(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().
1789 void setObjectWithInfo(const Reference& _xParams,
1790sal_Int32 parameterIndex,
1791const ::connectivity::ORowSetValue& _rValue,
1792sal_Int32 sqlType,
1793sal_Int32 scale)  throw(SQLException, 
RuntimeException)
1794 {
/connectivity/source/commontools/dbtools.cxx: 1789 in 
dbtools::setObjectWithInfo(const 
com::sun::star::uno::Reference &, int, const 
connectivity::ORowSetValue &, int, int)()
1783 {
1784 ORowSetValue aVal;
1785 aVal.fill(x);
1786 setObjectWithInfo(_xParams,parameterIndex,aVal,sqlType,scale);
1787 }
1788 
>>> CID 1372406:(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().
1789 void setObjectWithInfo(const Reference& _xParams,
1790sal_Int32 parameterIndex,
1791const ::connectivity::ORowSetValue& _rValue,
1792sal_Int32 sqlType,
1793sal_Int32 scale)  throw(SQLException, 
RuntimeException)
1794 {
/connectivity/source/commontools/dbtools.cxx: 1789 in 
dbtools::setObjectWithInfo(const 
com::sun::star::uno::Reference &, int, const 
connectivity::ORowSetValue &, int, int)()
1783 {
1784 ORowSetValue aVal;
1785 aVal.fill(x);
1786 setObjectWithInfo(_xParams,parameterIndex,aVal,sqlType,scale);
1787 }
1788 
>>> CID 1372406:(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().
1789 void setObjectWithInfo(const Reference& _xParams,
1790sal_Int32 parameterIndex,
1791const ::connectivity::ORowSetValue& _rValue,
1792sal_Int32 sqlType,
1793sal_Int32 scale)  throw(SQLException, 
RuntimeException)
1794 {

** CID 1372405:  Error handling issues  (UNCAUGHT_EXCEPT)
/dbaccess/source/core/api/WrappedResultSet.cxx: 95 in 
dbaccess::WrappedResultSet::updateRow(const 
rtl::Reference> &, const 
rtl::Reference> &, const 
com::sun::star::uno::Reference &)()



*** CID 1372405:  Error handling issues  (UNCAUGHT_EXCEPT)
/dbaccess/source/core/api/WrappedResultSet.cxx: 95 in 
dbaccess::WrappedResultSet::updateRow(const 
rtl::Reference> &, const 
rtl::Reference> &, const 
com::sun::star::uno::Reference &)()
89 updateColumn(i,m_xUpdRow,*aIter);
90 }
91 m_xUpd->insertRow();
92 (*_rInsertRow->get().begin()) = getBookmark();
93 }
94 
>>> CID 1372405:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown bu

New Defects reported by Coverity Scan for LibreOffice

2016-09-03 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.
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, std::equal_to, 
std::allocator>> *, 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, std::equal_to, 
std::allocator>> *, bool)()
1067 }
1068 break;
1069 case SC_CAT_MOVE :
1070 {
1071 const ScChangeActionMove* pMove = 
static_cast(pSourceAction);
1072 

New Defects reported by Coverity Scan for LibreOffice

2016-09-13 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.
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 4 of 4 defect(s)


** CID 1372879:  Insecure data handling  (INTEGER_OVERFLOW)
/lotuswordpro/source/filter/lwpgrfobj.cxx: 695 in 
LwpGraphicObject::XFConvertEquation(XFContentContainer *)()



*** CID 1372879:  Insecure data handling  (INTEGER_OVERFLOW)
/lotuswordpro/source/filter/lwpgrfobj.cxx: 695 in 
LwpGraphicObject::XFConvertEquation(XFContentContainer *)()
689 nBegin++;
690 nEnd--;
691 }
692 
693 if(nEnd >= nBegin)
694 {
>>> CID 1372879:  Insecure data handling  (INTEGER_OVERFLOW)
>>> Overflowed or truncated value (or a value computed from an overflowed 
>>> or truncated value) "nEnd - nBegin + 1U" used as critical argument to 
>>> function. [Note: The source code implementation of the function has been 
>>> overridden by a builtin model.]
695 sal_uInt8* pEquData = new sal_uInt8[nEnd - nBegin + 1];
696 for(sal_uInt32 nIndex = 0; nIndex < nEnd - nBegin +1 ; 
nIndex++)
697 {
698 pEquData[nIndex] = pGrafData[nBegin + nIndex];
699 }
700 
pXFNotePara->Add(OUString(reinterpret_cast(pEquData), (nEnd - nBegin + 
1), osl_getThreadTextEncoding()));

** CID 1372878:  Integer handling issues  (DIVIDE_BY_ZERO)
/svtools/source/graphic/grfmgr2.cxx: 1678 in 
GraphicObject::ImplRenderTempTile(VirtualDevice &, int, int, const Size &, 
const GraphicAttr *, GraphicManagerDrawFlags)()



*** CID 1372878:  Integer handling issues  (DIVIDE_BY_ZERO)
/svtools/source/graphic/grfmgr2.cxx: 1678 in 
GraphicObject::ImplRenderTempTile(VirtualDevice &, int, int, const Size &, 
const GraphicAttr *, GraphicManagerDrawFlags)()
1672nNumTilesY / nMSBFactor != 0 )
1673 {
1674 nMSBFactor *= nExponent;
1675 }
1676 
1677 // one less
>>> CID 1372878:  Integer handling issues  (DIVIDE_BY_ZERO)
>>> Assigning: "nMSBFactor" /= "2". The value of "nMSBFactor" is now 0.
1678 nMSBFactor /= nExponent;
1679 
1680 ImplTileInfo aTileInfo;
1681 
1682 // #105229# Switch off mapping (converting to logic and back to
1683 // pixel might cause roundoff errors)

** CID 1372877:  Possible Control flow issues  (DEADCODE)
/xmloff/source/core/xmlimp.cxx: 762 in SvXMLImport::startElement(const 
rtl::OUString &, const 
com::sun::star::uno::Reference &)()



*** CID 1372877:  Possible Control flow issues  (DEADCODE)
/xmloff/source/core/xmlimp.cxx: 762 in SvXMLImport::startElement(const 
rtl::OUString &, const 
com::sun::star::uno::Reference &)()
756 SAL_WARN_IF( !xContext.is(), "xmloff.core", 
"SvXMLImport::startElement: missing context" );
757 if( !xContext.is() )
758 xContext.set(new SvXMLImportContext( *this, nPrefix, aLocalName 
));
759 
760 // Remember old namespace map.
761 if( pRewindMap )
>>> CID 1372877:  Possible Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "xContext->PutRewindMap(pRew...".
762 xContext->PutRewindMap( pRewindMap );
763 
764 // Call a startElement at the new context.
765 xContext->StartElement( xAttrList );
766 
767 // Push context on stack.

** CID 1372876:  Possible Control flow issues  (DEADCODE)
/xmloff/source/core/xmlimp.cxx: 880 in SvXMLImport::startFastElement(int, const 
com::sun::star::uno::Reference 
&)()



*** CID 1372876:  Possible Control flow issues  (DEADCODE)
/xmloff/source/core/xmlimp.cxx: 880 in SvXMLImport::startFastElement(int, const 
com::sun::star::uno::Reference 
&)()
874 rtl::Reference < comphelper::AttributeList > rAttrList = new 
comphelper::AttributeList;
875 maNamespaceHandler->addNSDeclAttributes( rAttrList );
876 SvXMLNamespaceMap *pRewindMap = nullptr;
877 processNSAttributes( rAttrList.get(), pRewindMap );
878 SvXMLImportContext *pContext = 
dynamic_cast( xContext.get() );
879 if( pContext && pRewindMap )
>>> CID 1372876:  Possible Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "pContext->PutRewindMap(pRew...".
880 pContext->PutRewindMap( p

New Defects reported by Coverity Scan for LibreOffice

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


** CID 1372990:  Resource leaks  (RESOURCE_LEAK)
/xmloff/source/core/xmlimp.cxx: 887 in SvXMLImport::startFastElement(int, const 
com::sun::star::uno::Reference 
&)()



*** CID 1372990:  Resource leaks  (RESOURCE_LEAK)
/xmloff/source/core/xmlimp.cxx: 887 in SvXMLImport::startFastElement(int, const 
com::sun::star::uno::Reference 
&)()
881 maNamespaceHandler->addNSDeclAttributes( rAttrList );
882 SvXMLNamespaceMap *pRewindMap = 
processNSAttributes(rAttrList.get());
883 SvXMLImportContext *pContext = 
dynamic_cast( xContext.get() );
884 if( pContext && pRewindMap )
885 pContext->PutRewindMap( pRewindMap );
886 maContexts.push_back( pContext );
>>> CID 1372990:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "pRewindMap" going out of scope leaks the storage it points to.
887 }
888 
889 // Push context on stack.
890 maFastContexts.push_back( xContext );
891 }
892 



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyRyWAQFVX7P6bsI-2BQOY7H3EcAKISf1sb6wpwdnCIg-2F3qjqB44tKEcQbNeJ3qeddOis5WKzExZNDicRCJoQ-2Bk4IAqdw7lcbrCldgS3ZDbEQh4g3lrRej04MgGMptz-2FbIH0JXpWbMIHFcFbQ-2FCcOkWS3bYIqcRxRXB0yUcK8UTxY1M-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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyRyWAQFVX7P6bsI-2BQOY7H3HyfX16NjAsBhpnMwDTLDfCE-2FMQyOKKlkz8BbKg9-2BP-2Ffy7osw6HsbVhOzBRQJV-2B1lcyZNsA434ikbFXFPGNbyq97dZNgxF1-2Bg17ECTAaWapxiscxMmxpmotzyMxJn54GJPFr5LaDJ8fnRfQPWTNYVQw-3D

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


New Defects reported by Coverity Scan for LibreOffice

2017-11-02 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 1420539:  Control flow issues  (DEADCODE)
/sal/osl/unx/file_error_transl.cxx: 37 in oslTranslateFileError(int)()



*** CID 1420539:  Control flow issues  (DEADCODE)
/sal/osl/unx/file_error_transl.cxx: 37 in oslTranslateFileError(int)()
31the reason that we do this here */
32 if (Errno == 0)
33 return osl_error;
34 
35 switch(Errno)
36 {
>>> CID 1420539:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "case 0:".
37 case 0:
38 osl_error = osl_File_E_None;
39 break;
40 
41 case EPERM:
42 osl_error = osl_File_E_PERM;

** CID 1420538:  Incorrect expression  (COPY_PASTE_ERROR)
/filter/source/graphicfilter/ieps/ieps.cxx: 768 in ipsGraphicImport()



*** CID 1420538:  Incorrect expression  (COPY_PASTE_ERROR)
/filter/source/graphicfilter/ieps/ieps.cxx: 768 in ipsGraphicImport()
762 }
763 bool bFail = nSecurityCount == 0;
764 long nWidth(0), nHeight(0);
765 if (!bFail)
766 bFail = o3tl::checked_sub(nNumb[2], nNumb[0], 
nWidth) || o3tl::checked_add(nWidth, 1L, nWidth);
767 if (!bFail)
>>> CID 1420538:  Incorrect expression  (COPY_PASTE_ERROR)
>>> "nWidth" in "o3tl::checked_add(nWidth, 1L, nHeight)" looks like a 
>>> copy-paste error.
768 bFail = o3tl::checked_sub(nNumb[3], nNumb[1], 
nHeight) || o3tl::checked_add(nWidth, 1L, nHeight);
769 if (!bFail && nWidth > 0 && nHeight > 0)
770 {
771 GDIMetaFile aMtf;
772 
773 // if there is no preview -> try with gs to make one

** CID 1420537:  Uninitialized members  (UNINIT_CTOR)
/i18npool/source/characterclassification/cclass_unicode.cxx: 53 in 
i18npool::cclass_Unicode::cclass_Unicode(const 
com::sun::star::uno::Reference &)()



*** CID 1420537:  Uninitialized members  (UNINIT_CTOR)
/i18npool/source/characterclassification/cclass_unicode.cxx: 53 in 
i18npool::cclass_Unicode::cclass_Unicode(const 
com::sun::star::uno::Reference &)()
47 nContTypes( 0 ),
48 eState( ssGetChar ),
49 cGroupSep( ',' ),
50 cDecimalSep( '.' )
51 {
52 trans = new Transliteration_casemapping();
>>> CID 1420537:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "cDecimalSepAlt" is not initialized in this 
>>> constructor nor in any functions that it calls.
53 }
54 
55 cclass_Unicode::~cclass_Unicode() {
56 destroyParserTable();
57 delete trans;
58 }

** CID 1420536:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/view/drviews2.cxx: 317 in 
sd::ClassificationCollector::iterateSectionsAndCollect(const 
std::vector> &, const 
EditTextObject &)()



*** CID 1420536:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/view/drviews2.cxx: 317 in 
sd::ClassificationCollector::iterateSectionsAndCollect(const 
std::vector> &, const 
EditTextObject &)()
311 m_aResults.push_back({ 
svx::ClassificationType::PARAGRAPH, sWeightProperty, sBlank });
312 }
313 
314 const SvxFieldItem* pFieldItem = findField(rSection);
315 if (pFieldItem)
316 {
>>> CID 1420536:  Null pointer dereferences  (FORWARD_NULL)
>>> Assigning: "pCustomPropertyField" = "dynamic_cast 
>>> (pFieldItem->GetField())".
317 const auto* pCustomPropertyField = dynamic_cast(pFieldItem->GetField());
318 OUString aKey = pCustomPropertyField->GetName();
319 if (aKeyCreator.isMarkingTextKey(aKey))
320 {
321 OUString aValue = 
lcl_getProperty(xPropertyContainer, aKey);
322 m_aResults.push_back({ 
svx::ClassificationType::TEXT, aValue, sBlank });



To view the defects in Coverity Scan visit, 
https://u2389337.ct.sendgrid.net/wf/click?upn=08

New Defects reported by Coverity Scan for LibreOffice

2017-11-14 Thread scan-admin

Hi,

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

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


** CID 1421169:  Error handling issues  (UNCAUGHT_EXCEPT)
/connectivity/source/inc/java/GlobalRef.hxx: 58 in 
connectivity::jdbc::GlobalRef<_jobject *>::~GlobalRef()()



*** CID 1421169:  Error handling issues  (UNCAUGHT_EXCEPT)
/connectivity/source/inc/java/GlobalRef.hxx: 58 in 
connectivity::jdbc::GlobalRef<_jobject *>::~GlobalRef()()
52 
53 SDBThreadAttach t;
54 set( t.env(), _source.get() );
55 return *this;
56 }
57 
>>> CID 1421169:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type 
>>> "jvmaccess::VirtualMachine::AttachGuard::CreationException" 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().
58 ~GlobalRef()
59 {
60 reset();
61 }
62 
63 void reset()

** CID 1421168:  Error handling issues  (UNCAUGHT_EXCEPT)
/starmath/source/tmpdevice.hxx: 37 in SmTmpDevice::~SmTmpDevice()()



*** CID 1421168:  Error handling issues  (UNCAUGHT_EXCEPT)
/starmath/source/tmpdevice.hxx: 37 in SmTmpDevice::~SmTmpDevice()()
31 SmTmpDevice& operator=(const SmTmpDevice&) = delete;
32 
33 Color   Impl_GetColor( const Color& rColor );
34 
35 public:
36 SmTmpDevice(OutputDevice &rTheDev, bool bUseMap100th_mm);
>>> CID 1421168:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type 
>>> "boost::exception_detail::clone_impl
>>>  >" 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().
37 ~SmTmpDevice()  { rOutDev.Pop(); }
38 
39 void SetFont(const vcl::Font &rNewFont);
40 
41 void SetLineColor( const Color& rColor ){ rOutDev.SetLineColor( 
Impl_GetColor(rColor) ); }
42 void SetFillColor( const Color& rColor ){ rOutDev.SetFillColor( 
Impl_GetColor(rColor) ); }

** CID 1421167:  Error handling issues  (UNCAUGHT_EXCEPT)
/svx/source/unodraw/unoshap3.cxx: 60 in 
Svx3DSceneObject::Svx3DSceneObject(SdrObject *, SvxDrawPage *)()



*** CID 1421167:  Error handling issues  (UNCAUGHT_EXCEPT)
/svx/source/unodraw/unoshap3.cxx: 60 in 
Svx3DSceneObject::Svx3DSceneObject(SdrObject *, SvxDrawPage *)()
54 using namespace ::com::sun::star::container;
55 
56 #define QUERYINT( xint ) \
57 if( rType == cppu::UnoType::get() ) \
58 aAny <<= Reference< xint >(this)
59 
>>> CID 1421167:  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().
60 Svx3DSceneObject::Svx3DSceneObject( SdrObject* pObj, SvxDrawPage* 
pDrawPage ) throw()
61 :   SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_3DSCENEOBJECT), 
getSvxMapProvider().GetPropertySet(SVXMAP_3DSCENEOBJECT, 
SdrObject::GetGlobalDrawObjectItemPool()) )
62 ,   mxPage( pDrawPage )
63 {
64 }
65 

** CID 1421166:  Error handling issues  (UNCAUGHT_EXCEPT)
/svx/source/unodraw/unoshap4.cxx: 66 in SvxOle2Shape::SvxOle2Shape(SdrObject 
*)()



*** CID 1421166:  Error handling issues  (UNCAUGHT_EXCEPT)
/svx/source/unodraw/unoshap4.cxx: 66 in SvxOle2Shape::SvxOle2Shape(SdrObject 
*)()
60 using namespace ::com::sun::star::uno;
61 using namespace ::com::sun::star::lang;
62 using namespace ::com::sun::star::container;
63 using namespace ::com::sun::star::beans;
64 
65 
>>> CID 1421166:  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().
66 SvxOle2Shape::SvxOle2Shape( SdrObject* pObject ) throw()
67 : SvxShapeText( pObject, getSvxMapProvider().GetMap(SVXMAP_OLE2),
68 
getSvxMapProvider().GetPropertySet(SVXMAP_OLE2,SdrObject::GetGlobalDrawObjectItemPool())
 )
69 {
70

New Defects reported by Coverity Scan for LibreOffice

2017-11-17 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.
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 1 of 1 defect(s)


** CID 1422192:  Memory - corruptions  (OVERRUN)
/sc/source/core/tool/token.cxx: 361 in ScRawToken::SetExternal(const char16_t 
*)()



*** CID 1422192:  Memory - corruptions  (OVERRUN)
/sc/source/core/tool/token.cxx: 361 in ScRawToken::SetExternal(const char16_t 
*)()
355 eType = svExternal;
356 sal_Int32 nLen = GetStrLen( pStr ) + 1;
357 if( nLen > MAXSTRLEN )
358 nLen = MAXSTRLEN;
359 // Leave space for byte parameter!
360 memcpy( cStr+1, pStr, nLen * sizeof(sal_Unicode) );
>>> CID 1422192:  Memory - corruptions  (OVERRUN)
>>> Overrunning array "(*this).cStr" of 1025 2-byte elements at element 
>>> index 1025 (byte offset 2050) using index "nLen + 1" (which evaluates to 
>>> 1025).
361 cStr[ nLen+1 ] = 0;
362 }
363 
364 bool ScRawToken::IsValidReference() const
365 {
366 switch (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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpywv9lPUd-2B6VylT8WRwLWGXaQBtlBs1fPXn7p64Y10JvK8YFkrTv6NPbmEhqm3sN6aFlQfSiks3Z3tc6u0osL612aFbsrFn9Rj8xJf5PFbZ6Y-2BaNH9BzPJwANGcBB-2BInWftQuMTPPt2TzbSINb-2BcPtk4knsu-2FraPvAasxKEInWRjU-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-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpywv9lPUd-2B6VylT8WRwLWGXSerh7O1tz96SyeZQZtgW-2B4-2Bhes3HdNMVFOzS4y-2BIfVZL5NibSm-2FKEZK-2F9CrC926wD7djVCMlqnjhl0F-2F58TDonzSPgo5Q83WpLJoCUBkXxPpUWIl4nFt28B8tc0cHU31rb4y-2B5CxVIWCfdvt0u0S-2FM-3D

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


New Defects reported by Coverity Scan for LibreOffice

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


** CID 1414682:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/filter/ww8/ww8graf.cxx: 1221 in 
SwWW8ImplReader::ReadTextBox(WW8_DPHEAD *, SfxAllItemSet &)()



*** CID 1414682:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/filter/ww8/ww8graf.cxx: 1221 in 
SwWW8ImplReader::ReadTextBox(WW8_DPHEAD *, SfxAllItemSet &)()
1215 pObj->NbcSetSnapRect(tools::Rectangle(aP0, aP1));
1216 Size aSize( (sal_Int16)SVBT16ToShort( pHd->dxa ) ,
1217 (sal_Int16)SVBT16ToShort( pHd->dya ) );
1218 
1219 long nStartCpFly,nEndCpFly;
1220 bool bContainsGraphics;
>>> CID 1414682:  Null pointer dereferences  (FORWARD_NULL)
>>> Dynamic cast to pointer "dynamic_cast (pObj)" can return 
>>> "NULL".
1221 InsertTxbxText(dynamic_cast(pObj), &aSize, 0, 0, 0, 
nullptr, false,
1222 bDummy,nullptr,&nStartCpFly,&nEndCpFly,&bContainsGraphics);
1223 
1224 SetStdAttr( rSet, aTextB.aLnt, aTextB.aShd );
1225 SetFill( rSet, aTextB.aFill );
1226 



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyqlsX0Godtc0fyDvRbzdAhDsODb1a0r27CnPrXc6n98zTcVHev3JGSspgDhsrJKbciU2Q-2Bk2bJLK7JhAyisZzect50R8mf1ACZm-2FAb9t-2BY5NRmnU9zue-2BDGxO8OgDyOJ7JRy73V4ejaaLCFbRckkAKdta6CokVs8WQiQG-2BTcmBbA-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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyqlsX0Godtc0fyDvRbzdAhIOcc3cd7nSKt2SGSS-2FsUF1J0YCBA-2F6FEafJfrgD6z8-2FPbRK-2BIXoDL-2Fzxzn0pPidVORwa-2BmWn0kpTR2N4JMm1jiBDvXYk4taKm8QT8El27FVzeILA-2FsQaUFA02BTeiDtiiEueafkRry5c4-2Fv3WWwn7Y-3D

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


New Defects reported by Coverity Scan for LibreOffice

2017-07-14 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.
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 7 of 7 defect(s)


** CID 1415097:  Uninitialized members  (UNINIT_CTOR)
/sw/source/core/unocore/unoframe.cxx: 1259 in SwXFrame::SwXFrame(SwFrameFormat 
&, FlyCntType, const SfxItemPropertySet *)()



*** CID 1415097:  Uninitialized members  (UNINIT_CTOR)
/sw/source/core/unocore/unoframe.cxx: 1259 in SwXFrame::SwXFrame(SwFrameFormat 
&, FlyCntType, const SfxItemPropertySet *)()
1253 eType(eSet),
1254 pProps(nullptr),
1255 bIsDescriptor(false),
1256 m_pCopySource(nullptr)
1257 {
1258 
>>> CID 1415097:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_nDrawAspect" is not initialized in this 
>>> constructor nor in any functions that it calls.
1259 }
1260 
1261 SwXFrame::~SwXFrame()
1262 {
1263 SolarMutexGuard aGuard;
1264 delete m_pCopySource;

** CID 1415096:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/sidebar/SlideBackground.cxx: 782 in 
sd::sidebar::SlideBackground::NotifyItemUpdate(unsigned short, SfxItemState, 
const SfxPoolItem *, bool)()



*** CID 1415096:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/sidebar/SlideBackground.cxx: 782 in 
sd::sidebar::SlideBackground::NotifyItemUpdate(unsigned short, SfxItemState, 
const SfxPoolItem *, bool)()
776 
777 case SID_ATTR_PAGE_ULSPACE:
778 {
779 const SvxLongULSpaceItem* pULItem = nullptr;
780 if (eState >= SfxItemState::DEFAULT)
781 {
>>> CID 1415096:  Null pointer dereferences  (FORWARD_NULL)
>>> Assigning: "pULItem" = "dynamic_cast >> *>(pState)".
782 pULItem = dynamic_cast(pState);
783 m_nPageTopMargin = pULItem->GetUpper();
784 m_nPageBottomMargin = pULItem->GetLower();
785 SetFieldUnit(*m_pTopMarginEdit, meFieldUnit, true);
786 SetMetricValue(*m_pTopMarginEdit.get(), 
m_nPageTopMargin, meUnit);
787 SetFieldUnit(*m_pBottomMarginEdit, meFieldUnit, true);

** CID 1415095:  Program hangs  (INFINITE_LOOP)
/vcl/qa/cppunit/timer.cxx: 322 in TimerTest::testAutoTimerStop()()



*** CID 1415095:  Program hangs  (INFINITE_LOOP)
/vcl/qa/cppunit/timer.cxx: 322 in TimerTest::testAutoTimerStop()()
316 
317 void TimerTest::testAutoTimerStop()
318 {
319 sal_Int32 nTimerCount = 0;
320 const sal_Int32 nMaxCount = 5;
321 AutoTimerCount aAutoTimer( 0, nTimerCount, nMaxCount );
>>> CID 1415095:  Program hangs  (INFINITE_LOOP)
>>> If "5 != nTimerCount" is initially true then it will remain true.
322 while ( nMaxCount != nTimerCount )
323 Application::Yield();
324 CPPUNIT_ASSERT( !aAutoTimer.IsActive() );
325 CPPUNIT_ASSERT( !Application::Reschedule() );
326 }
327 

** CID 1415093:  Program hangs  (SLEEP)



*** CID 1415093:  Program hangs  (SLEEP)
/vcl/source/uitest/uno/uiobject_uno.cxx: 103 in 
::ExecuteWrapper::ExecuteActionHdl(Timer *)()
97 }
98 
99 Scheduler::ProcessEventsToSignal(mbSignal);
100 std::unique_lock lock(mMutex);
101 while (!mbSignal)
102 {
>>> CID 1415093:  Program hangs  (SLEEP)
>>> Call to "sleep_for" might sleep while holding lock "this->mMutex".
103 std::this_thread::sleep_for(std::chrono::milliseconds(5));
104 }
105 }
106 delete this;
107 }
108 

** CID 1415092:  Control flow issues  (DEADCODE)
/sc/source/filter/xml/XMLTrackedChangesContext.cxx: 1409 in 
ScXMLDeletionContext::ScXMLDeletionContext(ScXMLImport &, int, const 
com::sun::star::uno::Reference &, 
ScXMLChangeTrackingImportHelper *)()



*** CID 1415092:  Control flow issues  (DEADCODE)
/sc/source/filter/xml/XMLTrackedChangesContext.cxx: 1409 in 
ScXMLDeletionContext::ScXMLDeletionContext(ScXMLImport &, int, const 
com::sun::star::uno::Reference &, 
ScXMLChangeTrackingImportHelper *)()
1403 if (IsXMLToken( aIter, XML_ROW ))
1404 {
1405 nActionType = SC_CAT_DE

New Defects reported by Coverity Scan for LibreOffice

2017-07-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 1415515:  Incorrect expression  (DIVIDE_BY_ZERO)
/drawinglayer/source/tools/emfphelperdata.cxx: 367 in 
emfplushelper::EmfPlusHelperData::EmfPlusHelperData(SvMemoryStream &, 
wmfemfhelper::TargetHolders &, wmfemfhelper::PropertyHolders &)()



*** CID 1415515:  Incorrect expression  (DIVIDE_BY_ZERO)
/drawinglayer/source/tools/emfphelperdata.cxx: 367 in 
emfplushelper::EmfPlusHelperData::EmfPlusHelperData(SvMemoryStream &, 
wmfemfhelper::TargetHolders &, wmfemfhelper::PropertyHolders &)()
361 mnHDPI(0),
362 mnVDPI(0),
363 mnFrameLeft(0),
364 mnFrameTop(0),
365 mnFrameRight(0),
366 mnFrameBottom(0),
>>> CID 1415515:  Incorrect expression  (DIVIDE_BY_ZERO)
>>> Assigning: "this->mnPixX" = "0".
367 mnPixX(0),
368 mnPixY(0),
369 mnMmX(0),
370 mnMmY(0),
371 mbMultipart(false),
372 mMFlags(0),

** CID 1415514:(FORWARD_NULL)
/sw/source/core/layout/sectfrm.cxx: 1730 in SwFrame::GetPrevSctLeaf()()
/sw/source/core/layout/sectfrm.cxx: 1730 in SwFrame::GetPrevSctLeaf()()



*** CID 1415514:(FORWARD_NULL)
/sw/source/core/layout/sectfrm.cxx: 1730 in SwFrame::GetPrevSctLeaf()()
1724 }
1725 
1726 if( bJump ) // Did we skip a blank page?
1727 SwFlowFrame::SetMoveBwdJump( true );
1728 
1729 SwSectionFrame *pSect = FindSctFrame();
>>> CID 1415514:(FORWARD_NULL)
>>> Comparing "pSect" to null implies that "pSect" might be null.
1730 if (!pCol && pSect && IsInTab() && !IsInTableInSection(this))
1731 {
1732 // We don't have a previous section yet, and we're in a
1733 // section-in-table.
1734 if (SwFlowFrame* pPrecede = pSect->GetPrecede())
1735 {
/sw/source/core/layout/sectfrm.cxx: 1730 in SwFrame::GetPrevSctLeaf()()
1724 }
1725 
1726 if( bJump ) // Did we skip a blank page?
1727 SwFlowFrame::SetMoveBwdJump( true );
1728 
1729 SwSectionFrame *pSect = FindSctFrame();
>>> CID 1415514:(FORWARD_NULL)
>>> Comparing "pSect" to null implies that "pSect" might be null.
1730 if (!pCol && pSect && IsInTab() && !IsInTableInSection(this))
1731 {
1732 // We don't have a previous section yet, and we're in a
1733 // section-in-table.
1734 if (SwFlowFrame* pPrecede = pSect->GetPrecede())
1735 {

** CID 1415513:  Incorrect expression  (DIVIDE_BY_ZERO)
/drawinglayer/source/tools/emfphelperdata.cxx: 368 in 
emfplushelper::EmfPlusHelperData::EmfPlusHelperData(SvMemoryStream &, 
wmfemfhelper::TargetHolders &, wmfemfhelper::PropertyHolders &)()



*** CID 1415513:  Incorrect expression  (DIVIDE_BY_ZERO)
/drawinglayer/source/tools/emfphelperdata.cxx: 368 in 
emfplushelper::EmfPlusHelperData::EmfPlusHelperData(SvMemoryStream &, 
wmfemfhelper::TargetHolders &, wmfemfhelper::PropertyHolders &)()
362 mnVDPI(0),
363 mnFrameLeft(0),
364 mnFrameTop(0),
365 mnFrameRight(0),
366 mnFrameBottom(0),
367 mnPixX(0),
>>> CID 1415513:  Incorrect expression  (DIVIDE_BY_ZERO)
>>> Assigning: "this->mnPixY" = "0".
368 mnPixY(0),
369 mnMmX(0),
370 mnMmY(0),
371 mbMultipart(false),
372 mMFlags(0),
373 mMStream(),

** CID 1415512:  Error handling issues  (CHECKED_RETURN)
/xmlsecurity/source/helper/xsecverify.cxx: 316 in 
XSecController::setDate(rtl::OUString &)()



*** CID 1415512:  Error handling issues  (CHECKED_RETURN)
/xmlsecurity/source/helper/xsecverify.cxx: 316 in 
XSecController::setDate(rtl::OUString &)()
310 if (m_vInternalSignatureInformations.empty())
311 {
312 SAL_INFO("xmlsecurity.helper","XSecController::setDate: no 
signature");
313 return;
314 }
315 InternalSignatureInformation &isi = 
m_vInternalSignatureInformations.back();
>>> CID 1415512:  Error handling issues  (CHECKED_RETURN)
>>> Calling "ISO8601parseDateTime" without checking return value (as is 
>>> done elsewhere 6 out 

New Defects reported by Coverity Scan for LibreOffice

2017-07-23 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.
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 12 of 12 defect(s)


** CID 1415622:  Memory - illegal accesses  (RETURN_LOCAL)
/uui/source/iahndl.cxx: 1197 in 
UUIInteractionHelper::handleBrokenPackageRequest(const 
std::vector> &, const 
com::sun::star::uno::Sequence>
 &, bool, bool &, rtl::OUString &)()



*** CID 1415622:  Memory - illegal accesses  (RETURN_LOCAL)
/uui/source/iahndl.cxx: 1197 in 
UUIInteractionHelper::handleBrokenPackageRequest(const 
std::vector> &, const 
com::sun::star::uno::Sequence>
 &, bool, bool &, rtl::OUString &)()
1191 }
1192 else
1193 return;
1194 
1195 OUString aMessage;
1196 {
>>> CID 1415622:  Memory - illegal accesses  (RETURN_LOCAL)
>>> Temporary variable of type "std::locale" goes out of scope.
1197 ErrorResource aErrorResource(RID_UUI_ERRHDL, 
Translate::Create("uui", Application::GetSettings().GetUILanguageTag()));
1198 if (!aErrorResource.getString(nErrorCode, aMessage))
1199 return;
1200 }
1201 
1202 aMessage = replaceMessageWithArguments( aMessage, rArguments );

** CID 1415621:  Memory - illegal accesses  (OVERRUN)
/sw/source/core/layout/pagedesc.cxx: 382 in SwPageDesc::GetByName(SwDoc &, 
const rtl::OUString &)()



*** CID 1415621:  Memory - illegal accesses  (OVERRUN)
/sw/source/core/layout/pagedesc.cxx: 382 in SwPageDesc::GetByName(SwDoc &, 
const rtl::OUString &)()
376 return pDsc;
377 }
378 }
379 
380 for (size_t i = 0; i <= SAL_N_ELEMENTS(STR_POOLPAGE); ++i)
381 {
>>> CID 1415621:  Memory - illegal accesses  (OVERRUN)
>>> Overrunning array "STR_POOLPAGE" of 10 8-byte elements at element index 
>>> 10 (byte offset 80) using index "i" (which evaluates to 10).
382 if (rName == SwResId(STR_POOLPAGE[i]))
383 {
384 return 
rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool( static_cast< sal_uInt16 
>(
385 i + RES_POOLPAGE_BEGIN) );
386 }
387 }

** CID 1415620:  Error handling issues  (CHECKED_RETURN)
/sc/source/core/data/attrib.cxx: 874 in 
ScViewObjectModeItem::GetPresentation(SfxItemPresentation, MapUnit, MapUnit, 
rtl::OUString &, const IntlWrapper *) const()



*** CID 1415620:  Error handling issues  (CHECKED_RETURN)
/sc/source/core/data/attrib.cxx: 874 in 
ScViewObjectModeItem::GetPresentation(SfxItemPresentation, MapUnit, MapUnit, 
rtl::OUString &, const IntlWrapper *) const()
868 break;
869 
870 default: break;
871 }
872 SAL_FALLTHROUGH;
873 case SfxItemPresentation::Nameless:
>>> CID 1415620:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetValue" without checking return value (as is done elsewhere 
>>> 6 out of 7 times).
874 rText += 
ScGlobal::GetRscString(STR_VOBJ_MODE_SHOW+GetValue());
875 return true;
876 break;
877 
878 default: break;
879 // added to avoid warnings

** CID 1415619:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/core/data/global.cxx: 359 in 
ScGlobal::GetLongErrorString(FormulaError)()



*** CID 1415619:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/core/data/global.cxx: 359 in 
ScGlobal::GetLongErrorString(FormulaError)()
353 OUString ScGlobal::GetLongErrorString(FormulaError nErr)
354 {
355 const char* pErrNumber;
356 switch (nErr)
357 {
358 case FormulaError::NONE:
>>> CID 1415619:  Null pointer dereferences  (FORWARD_NULL)
>>> Assigning: "pErrNumber" = "NULL".
359 pErrNumber = nullptr;
360 break;
361 case FormulaError::IllegalArgument:
362 pErrNumber = STR_LONG_ERR_ILL_ARG;
363 break;
364 case FormulaError::IllegalFPOperation:

** CID 1415618:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/gdi/bitmap3.cxx: 597 in Bitmap::ImplConvertDown(unsigned short, 
const Color *)()



*** CID 1415618:  Null pointer dereferences  (FORWARD

New Defects reported by Coverity Scan for LibreOffice

2017-01-09 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.
17 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 1398527:  Error handling issues  (UNCAUGHT_EXCEPT)
/scripting/source/dlgprov/dlgprov.cxx: 615 in 
dlgprov::DialogProviderImpl::createDialogImpl(const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, bool)()



*** CID 1398527:  Error handling issues  (UNCAUGHT_EXCEPT)
/scripting/source/dlgprov/dlgprov.cxx: 615 in 
dlgprov::DialogProviderImpl::createDialogImpl(const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, bool)()
609 
610 // XDialogProvider
611 
612 
613 static const char aDecorationPropName[] = "Decoration";
614 
>>> CID 1398527:  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::lang::IllegalArgumentException)" doesn't allow it to be 
>>> thrown. This will cause a call to unexpected() which usually calls 
>>> terminate().
615 Reference < XControl > DialogProviderImpl::createDialogImpl(
616 const OUString& URL, const Reference< XInterface >& xHandler,
617 const Reference< XWindowPeer >& xParent, bool 
bDialogProviderMode )
618 throw (IllegalArgumentException, RuntimeException)
619 {
620 // if the dialog is located in a document, the document must 
already be open!

** CID 1398526:  Error handling issues  (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 602 in 
com::sun::star::i18n::LocaleDataImpl::getCalendarItemByName(const rtl::OUString 
&, const com::sun::star::lang::Locale &, const 
com::sun::star::uno::Sequence &, short)()



*** CID 1398526:  Error handling issues  (UNCAUGHT_EXCEPT)
/i18npool/source/localedata/localedata.cxx: 602 in 
com::sun::star::i18n::LocaleDataImpl::getCalendarItemByName(const rtl::OUString 
&, const com::sun::star::lang::Locale &, const 
com::sun::star::uno::Sequence &, short)()
596 #define REF_MONTHS   1
597 #define REF_GMONTHS  2
598 #define REF_PMONTHS  3
599 #define REF_ERAS 4
600 #define REF_OFFSET_COUNT 5
601 
>>> CID 1398526:  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().
602 Sequence< CalendarItem2 > &LocaleDataImpl::getCalendarItemByName(const 
OUString& name,
603 const Locale& rLocale, const Sequence< Calendar2 >& 
calendarsSeq, sal_Int16 item)
604 throw(RuntimeException)
605 {
606 if (!ref_name.equals(name)) {
607 OUString aLocStr, id;

** CID 1398525:  Error handling issues  (UNCAUGHT_EXCEPT)
/filter/source/config/cache/filtercache.cxx: 1516 in 
filter::config::FilterCache::impl_readPatchUINames(const 
com::sun::star::uno::Reference &, 
filter::config::CacheItem &)()



*** CID 1398525:  Error handling issues  (UNCAUGHT_EXCEPT)
/filter/source/config/cache/filtercache.cxx: 1516 in 
filter::config::FilterCache::impl_readPatchUINames(const 
com::sun::star::uno::Reference &, 
filter::config::CacheItem &)()
1510 default: break;
1511 }
1512 }
1513 }
1514 
1515 
>>> CID 1398525:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list 
>>> "throw(com::sun::star::uno::Exception)" doesn't allow it to be thrown. This 
>>> will cause a call to unexpected() which usually calls terminate().
1516 void FilterCache::impl_readPatchUINames(const css::uno::Reference< 
css::container::XNameAccess >& xNode,
1517   CacheItem&   
   rItem)
1518 throw(css::uno::Exception)
1519 {
1520 
1521 // SAFE -> --

** CID 1398524:  Error handling issues  (UNCAUGHT_EXCEPT)
/linguistic/source/lngsvcmgr.cxx: 2019 in LngSvcMgr_CreateInstance(const 
com::sun::star::uno::Reference &)()



*** C

New Defects reported by Coverity Scan for LibreOffice

2017-01-13 Thread scan-admin

Hi,

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

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


** CID 1398592:  Error handling issues  (UNCAUGHT_EXCEPT)
/svx/source/unodraw/tableshape.cxx: 50 in 
SvxTableShape::setPropertyValueImpl(const rtl::OUString &, const 
SfxItemPropertySimpleEntry *, const com::sun::star::uno::Any &)()



*** CID 1398592:  Error handling issues  (UNCAUGHT_EXCEPT)
/svx/source/unodraw/tableshape.cxx: 50 in 
SvxTableShape::setPropertyValueImpl(const rtl::OUString &, const 
SfxItemPropertySimpleEntry *, const com::sun::star::uno::Any &)()
44 
45 SvxTableShape::~SvxTableShape() throw()
46 {
47 }
48 
49 
>>> CID 1398592:  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::lang::WrappedTargetException, 
>>> com::sun::star::lang::IllegalArgumentException, 
>>> com::sun::star::beans::PropertyVetoException, 
>>> com::sun::star::beans::UnknownPropertyException)" doesn't allow it to be 
>>> thrown. This will cause a call to unexpected() which usually calls 
>>> terminate().
50 bool SvxTableShape::setPropertyValueImpl(
51 const OUString& rName,
52 const SfxItemPropertySimpleEntry* pProperty,
53 const css::uno::Any& rValue )
54 throw(css::beans::UnknownPropertyException, 
css::beans::PropertyVetoException, css::lang::IllegalArgumentException, 
css::lang::WrappedTargetException, css::uno::RuntimeException)
55 {

** CID 1398591:(UNCAUGHT_EXCEPT)
/filter/source/config/cache/filtercache.cxx: 1602 in 
filter::config::FilterCache::impl_loadItem(const 
com::sun::star::uno::Reference &, 
filter::config::FilterCache::EItemType, const rtl::OUString &, 
filter::config::FilterCache::EReadOption)()
/filter/source/config/cache/filtercache.cxx: 1602 in 
filter::config::FilterCache::impl_loadItem(const 
com::sun::star::uno::Reference &, 
filter::config::FilterCache::EItemType, const rtl::OUString &, 
filter::config::FilterCache::EReadOption)()



*** CID 1398591:(UNCAUGHT_EXCEPT)
/filter/source/config/cache/filtercache.cxx: 1602 in 
filter::config::FilterCache::impl_loadItem(const 
com::sun::star::uno::Reference &, 
filter::config::FilterCache::EItemType, const rtl::OUString &, 
filter::config::FilterCache::EReadOption)()
1596 TODO
1597 clarify, how the real problem behind the
1598 wrong constructed CacheItem instance (which
1599 will force a crash during destruction)
1600 can be solved ...
1601 ---*/
>>> CID 1398591:(UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list 
>>> "throw(com::sun::star::uno::Exception)" doesn't allow it to be thrown. This 
>>> will cause a call to unexpected() which usually calls terminate().
1602 CacheItem FilterCache::impl_loadItem(const css::uno::Reference< 
css::container::XNameAccess >& xSet   ,
1603EItemType   
eType  ,
1604  const OUString&   
 sItem  ,
1605EReadOption 
eOption)
1606 throw(css::uno::Exception)
1607 {
/filter/source/config/cache/filtercache.cxx: 1602 in 
filter::config::FilterCache::impl_loadItem(const 
com::sun::star::uno::Reference &, 
filter::config::FilterCache::EItemType, const rtl::OUString &, 
filter::config::FilterCache::EReadOption)()
1596 TODO
1597 clarify, how the real problem behind the
1598 wrong constructed CacheItem instance (which
1599 will force a crash during destruction)
1600 can be solved ...
1601 ---*/
>>> CID 1398591:(UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list 
>>> "throw(com::sun::star::uno::Exception)" doesn't allow it to be thrown. This 
>>> will cause a call to unexpected() which usually calls terminate().
1602 CacheItem FilterCache::impl_loadItem(const css::uno::Reference< 
css::container::XNameAccess >& xSet   ,
1603EItemType   
eType  ,
1604  const OUSt

New Defects reported by Coverity Scan for LibreOffice

2017-01-16 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.
525 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 6 of 6 defect(s)


** CID 1398822:  FindBugs: Dodgy code  (FB.BC_VACUOUS_INSTANCEOF)
/qadevOOo/runner/helper/CfgParser.java: 60 in 
helper.CfgParser.getIniParameters(lib.TestParameters)()



*** CID 1398822:  FindBugs: Dodgy code  (FB.BC_VACUOUS_INSTANCEOF)
/qadevOOo/runner/helper/CfgParser.java: 60 in 
helper.CfgParser.getIniParameters(lib.TestParameters)()
54 Enumeration cfgEnum = cfg.keys();
55 while (cfgEnum.hasMoreElements())
56 {
57 String pName = (String) cfgEnum.nextElement();
58 Object pValue = cfg.getProperty(pName);
59 
>>> CID 1398822:  FindBugs: Dodgy code  (FB.BC_VACUOUS_INSTANCEOF)
>>> instanceof will always return true for all nonnull values, since all 
>>> String are instances of String.
60 if (pValue instanceof String)
61 {
62 pValue = ((String) pValue).trim();
63 }
64 
65 param.put(pName.trim(), pValue);

** CID 1398821:  Error handling issues  (UNCAUGHT_EXCEPT)
/filter/source/config/cache/filtercache.cxx: 202 in 
filter::config::FilterCache::load(filter::config::FilterCache::EFillState)()



*** CID 1398821:  Error handling issues  (UNCAUGHT_EXCEPT)
/filter/source/config/cache/filtercache.cxx: 202 in 
filter::config::FilterCache::load(filter::config::FilterCache::EFillState)()
196 // But here we can check against the later changes...
197 impl_validateAndOptimize();
198 // <- SAFE --
199 }
200 
201 
>>> CID 1398821:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list 
>>> "throw(com::sun::star::uno::Exception)" doesn't allow it to be thrown. This 
>>> will cause a call to unexpected() which usually calls terminate().
202 void FilterCache::load(EFillState eRequired)
203 throw(css::uno::Exception)
204 {
205 // SAFE -> --
206 ::osl::ResettableMutexGuard aLock(m_aLock);
207 

** CID 1398820:(UNCAUGHT_EXCEPT)
/filter/source/config/cache/filtercache.cxx: 1406 in 
filter::config::FilterCache::impl_loadSet(const 
com::sun::star::uno::Reference &, 
filter::config::FilterCache::EItemType, 
filter::config::FilterCache::EReadOption, std::unordered_map, 
std::allocator>> *)()
/filter/source/config/cache/filtercache.cxx: 1406 in 
filter::config::FilterCache::impl_loadSet(const 
com::sun::star::uno::Reference &, 
filter::config::FilterCache::EItemType, 
filter::config::FilterCache::EReadOption, std::unordered_map, 
std::allocator>> *)()



*** CID 1398820:(UNCAUGHT_EXCEPT)
/filter/source/config/cache/filtercache.cxx: 1406 in 
filter::config::FilterCache::impl_loadSet(const 
com::sun::star::uno::Reference &, 
filter::config::FilterCache::EItemType, 
filter::config::FilterCache::EReadOption, std::unordered_map, 
std::allocator>> *)()
1400 impl_validateAndOptimize();
1401 
1402 // <- SAFE
1403 }
1404 
1405 
>>> CID 1398820:(UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list 
>>> "throw(com::sun::star::uno::Exception)" doesn't allow it to be thrown. This 
>>> will cause a call to unexpected() which usually calls terminate().
1406 void FilterCache::impl_loadSet(const css::uno::Reference< 
css::container::XNameAccess >& xConfig,
1407  EItemType 
  eType  ,
1408  EReadOption   
  eOption,
1409  CacheItemList*
  pCache )
1410 throw(css::uno::Exception)
1411 {
/filter/source/config/cache/filtercache.cxx: 1406 in 
filter::config::FilterCache::impl_loadSet(const 
com::sun::star::uno::Reference &, 
filter::config::FilterCache::EItemType, 
filter::config::FilterCache::EReadOption, std::unordered_map, 
std::allocator>> *)()
1400 impl_validateAndOptimize();
1401 
1402 // <- SAFE
1403 }
1404 
1405 
>>> CID 1398820:(UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the

New Defects reported by Coverity Scan for LibreOffice

2017-01-20 Thread scan-admin

Hi,

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

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


** CID 1399404:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/text/redlnitr.cxx: 185 in SwRedlineItr::~SwRedlineItr()()



*** CID 1399404:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/text/redlnitr.cxx: 185 in SwRedlineItr::~SwRedlineItr()()
179 pExt = new SwExtend( *pArr, nExtStart );
180 else
181 pExt = nullptr;
182 Seek (rFnt, 0, COMPLETE_STRING);
183 }
184 
>>> CID 1399404:  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().
185 SwRedlineItr::~SwRedlineItr()
186 {
187 Clear( nullptr );
188 delete pSet;
189 delete pExt;
190 }

** CID 1399403:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/bastyp/calc.cxx: 364 in SwCalc::~SwCalc()()



*** CID 1399403:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/bastyp/calc.cxx: 364 in SwCalc::~SwCalc()()
358 nVal.PutString( rUserOptions.GetToken( aAdrToken[ 11 ] ));
359 sTmpStr = OUString::createFromAscii(sNTypeTab[25]);
360 m_aVarTable[ aHashValue[ 25 ] ]->pNext.reset( new SwCalcExp( 
sTmpStr, nVal, nullptr ) );
361 
362 } // SwCalc::SwCalc
363 
>>> CID 1399403:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" 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().
364 SwCalc::~SwCalc()
365 {
366 for(SwHash* p : m_aVarTable)
367 delete p;
368 
369 if( m_pLocaleDataWrapper != m_aSysLocale.GetLocaleDataPtr() )

** CID 1399402:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/uibase/app/docstyle.cxx: 115 in 
SwImplShellAction::~SwImplShellAction()()



*** CID 1399402:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/uibase/app/docstyle.cxx: 115 in 
SwImplShellAction::~SwImplShellAction()()
109 {
110 pCurrSh = new CurrShell( pSh );
111 pSh->StartAllAction();
112 }
113 }
114 
>>> CID 1399402:  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().
115 SwImplShellAction::~SwImplShellAction()
116 {
117 if( pCurrSh )
118 {
119 pSh->EndAllAction();
120 delete pCurrSh;

** CID 1399401:(UNCAUGHT_EXCEPT)
/extensions/source/propctrlr/browserline.cxx: 70 in 
pcr::OBrowserLine::~OBrowserLine()()
/extensions/source/propctrlr/browserline.cxx: 70 in 
pcr::OBrowserLine::~OBrowserLine()()



*** CID 1399401:(UNCAUGHT_EXCEPT)
/extensions/source/propctrlr/browserline.cxx: 70 in 
pcr::OBrowserLine::~OBrowserLine()()
64 ,m_bIndentTitle( false )
65 ,m_bReadOnly( false )
66 {
67 m_aFtTitle->Show();
68 }
69 
>>> CID 1399401:(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().
70 OBrowserLine::~OBrowserLine()
71 {
72 implHideBrowseButton( true, false );
73 implHideBrowseButton( false, false );
74 m_aFtTitle.disposeAndClear();
75 }
/extensions/source/propctrlr/browserline.cxx: 70 in 
pcr::OBrowserLine::~OBrowserLine()()
64 ,m_bIndentTitle( false )
65 ,m_bReadOnly( false )
66 {
67 m_aFtTitle->Show();
68 }
69 
>>> CID 1399401:(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().
70 OBrows

New Defects reported by Coverity Scan for LibreOffice

2017-01-23 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.
41 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 1399552:  Integer handling issues  (SIGN_EXTENSION)
/vcl/source/filter/sgfbram.cxx: 297 in SgfFilterBMap(SvStream &, SvStream &, 
SgfHeader &, SgfEntry &)()



*** CID 1399552:  Integer handling issues  (SIGN_EXTENSION)
/vcl/source/filter/sgfbram.cxx: 297 in SgfFilterBMap(SvStream &, SvStream &, 
SgfHeader &, SgfEntry &)()
291 }
292 } else if (nColors==256) {
293 
294 //we're going to loop Ysize * XSize on GetByte, max compression 
for GetByte is a run of 63
295 //if we're less than that (and add a generous amount of wriggle 
room) then its not going
296 //to fly
>>> CID 1399552:  Integer handling issues  (SIGN_EXTENSION)
>>> Suspicious implicit sign extension: "rHead.Ysize" with type 
>>> "sal_uInt16" (16 bits, unsigned) is promoted in "rHead.Xsize * rHead.Ysize 
>>> / 128" to type "int" (32 bits, signed), then sign-extended to type 
>>> "unsigned long" (64 bits, unsigned).  If "rHead.Xsize * rHead.Ysize / 128" 
>>> is greater than 0x7FFF, the upper bits of the result will all be 1.
297 const sal_uInt64 nMinBytesPossiblyNeeded = rHead.Xsize * 
rHead.Ysize / 128;
298 if (rInp.remainingSize() < nMinBytesPossiblyNeeded)
299 return false;
300 
301 cRGB[3]=0;  // fourth palette entry for BMP
302 for (sal_uInt16 i=0;i<256;i++) {   // copy palette

** CID 1399551:  Integer handling issues  (SIGN_EXTENSION)
/vcl/source/filter/sgfbram.cxx: 297 in SgfFilterBMap(SvStream &, SvStream &, 
SgfHeader &, SgfEntry &)()



*** CID 1399551:  Integer handling issues  (SIGN_EXTENSION)
/vcl/source/filter/sgfbram.cxx: 297 in SgfFilterBMap(SvStream &, SvStream &, 
SgfHeader &, SgfEntry &)()
291 }
292 } else if (nColors==256) {
293 
294 //we're going to loop Ysize * XSize on GetByte, max compression 
for GetByte is a run of 63
295 //if we're less than that (and add a generous amount of wriggle 
room) then its not going
296 //to fly
>>> CID 1399551:  Integer handling issues  (SIGN_EXTENSION)
>>> Suspicious implicit sign extension: "rHead.Xsize" with type 
>>> "sal_uInt16" (16 bits, unsigned) is promoted in "rHead.Xsize * rHead.Ysize 
>>> / 128" to type "int" (32 bits, signed), then sign-extended to type 
>>> "unsigned long" (64 bits, unsigned).  If "rHead.Xsize * rHead.Ysize / 128" 
>>> is greater than 0x7FFF, the upper bits of the result will all be 1.
297 const sal_uInt64 nMinBytesPossiblyNeeded = rHead.Xsize * 
rHead.Ysize / 128;
298 if (rInp.remainingSize() < nMinBytesPossiblyNeeded)
299 return false;
300 
301 cRGB[3]=0;  // fourth palette entry for BMP
302 for (sal_uInt16 i=0;i<256;i++) {   // copy palette

** CID 1399550:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/unoidl/unopage.cxx: 2706 in 
SdMasterPage::SdMasterPage(SdXImpressDocument *, SdPage *)()



*** CID 1399550:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/unoidl/unopage.cxx: 2706 in 
SdMasterPage::SdMasterPage(SdXImpressDocument *, SdPage *)()
2700 return Any( Reference< XIndexAccess >( this ) );
2701 }
2702 }
2703 
2704 // class SdMasterPage
2705 SdMasterPage::SdMasterPage( SdXImpressDocument* pModel, SdPage* pPage 
) throw()
>>> CID 1399550:  Null pointer dereferences  (FORWARD_NULL)
>>> Comparing "pPage" to null implies that "pPage" might be null.
2706 : SdGenericDrawPage( pModel, pPage, ImplGetMasterPagePropertySet( 
pPage ? pPage->GetPageKind() : PageKind::Standard ) )
2707 {
2708 }
2709 
2710 SdMasterPage::~SdMasterPage() throw()
2711 {



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyto4qO066Rh0hXrp2oBZ4b-2Bxsdz-2FWSMWLQW9tdkWAtJPhX9rQ-2BdJDOkcVNWRxD2LkCdzRYe7U4AUYhcJ46wAl3SSTVnEj-2BY6ugYp4Wp1mcWPhAooe2SPvPdlgXMLUdnv8T3OY4DHD7MjcczCHZA

New Defects reported by Coverity Scan for LibreOffice

2017-05-26 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.
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 10 of 10 defect(s)


** CID 1409901:  Code maintainability issues  (UNUSED_VALUE)
/sc/source/core/tool/interpr1.cxx: 3885 in ScInterpreter::GetStVarParams(bool, 
double (*)(double, unsigned long))()



*** CID 1409901:  Code maintainability issues  (UNUSED_VALUE)
/sc/source/core/tool/interpr1.cxx: 3885 in ScInterpreter::GetStVarParams(bool, 
double (*)(double, unsigned long))()
3879 {
3880 rArrayValue.mfSum = CreateDoubleError( nErr);
3881 }
3882 // Reset.
3883 std::vector().swap(values);
3884 fSum = 0.0;
>>> CID 1409901:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value "18446744073709551615UL" to "nRefArrayPos" here, but 
>>> that stored value is overwritten before it can be used.
3885 nRefArrayPos = std::numeric_limits::max();
3886 break;
3887 }
3888 }
3889 SAL_FALLTHROUGH;
3890 case svDoubleRef :

** CID 1409900:  Error handling issues  (UNCAUGHT_EXCEPT)
/sdext/source/presenter/PresenterTextView.cxx: 1087 in 
sdext::presenter::PresenterTextCaret::~PresenterTextCaret()()



*** CID 1409900:  Error handling issues  (UNCAUGHT_EXCEPT)
/sdext/source/presenter/PresenterTextView.cxx: 1087 in 
sdext::presenter::PresenterTextCaret::~PresenterTextCaret()()
1081   maInvalidator(rInvalidator),
1082   maBroadcaster(),
1083   maCaretBounds()
1084 {
1085 }
1086 
>>> CID 1409900:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::DeploymentException" 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().
1087 PresenterTextCaret::~PresenterTextCaret()
1088 {
1089 HideCaret();
1090 }
1091 
1092 void PresenterTextCaret::ShowCaret()

** CID 1409899:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/para/paratr.cxx: 71 in SwFormatDrop::SetCharFormat(SwCharFormat 
*)()



*** CID 1409899:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/para/paratr.cxx: 71 in SwFormatDrop::SetCharFormat(SwCharFormat 
*)()
65 void SwFormatDrop::SetCharFormat( SwCharFormat *pNew )
66 {
67 assert(!pNew->IsDefault()); // expose cases that lead to 
use-after-free
68 // Rewire
69 if ( GetRegisteredIn() )
70 GetRegisteredInNonConst()->Remove( this );
>>> CID 1409899:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pNew" suggests that it may be null, but it has already 
>>> been dereferenced on all paths leading to the check.
71 if(pNew)
72 pNew->Add( this );
73 }
74 
75 void SwFormatDrop::Modify( const SfxPoolItem*, const SfxPoolItem * )
76 {

** CID 1409898:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/core/tool/compiler.cxx: 1777 in ScCompiler::ScCompiler(ScDocument *, 
const ScAddress &, ScTokenArray &, formula::FormulaGrammar::Grammar)()



*** CID 1409898:  Null pointer dereferences  (REVERSE_INULL)
/sc/source/core/tool/compiler.cxx: 1777 in ScCompiler::ScCompiler(ScDocument *, 
const ScAddress &, ScTokenArray &, formula::FormulaGrammar::Grammar)()
1771 pConv( GetRefConvention( FormulaGrammar::CONV_OOO ) ),
1772 meExtendedErrorDetection( EXTENDED_ERROR_DETECTION_NONE ),
1773 mbCloseBrackets( true ),
1774 mbRewind( false )
1775 {
1776 SetGrammar( ((eGrammar == 
formula::FormulaGrammar::GRAM_UNSPECIFIED) ?
>>> CID 1409898:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pDocument" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
1777 (pDocument ? pDocument->GetGrammar() : 
formula::FormulaGrammar::GRAM_DEFAULT) :
1778 eGrammar));
1779 nMaxTab = pDoc->GetTableCount() - 1;
1780 }
1781 
1782 ScCompiler::ScCompiler( sc::CompileFormulaContext& rCxt, const 
ScAddress& rPos ) :

** CID 1409897:  N

New Defects reported by Coverity Scan for LibreOffice

2017-05-30 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.
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 5 of 5 defect(s)


** CID 1411569:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1790 in 
SwTiledRenderingTest::testDisableUndoRepair()()



*** CID 1411569:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1790 in 
SwTiledRenderingTest::testDisableUndoRepair()()
1784 CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, 
aItemSet2.GetItemState(SID_UNDO));
1785 CPPUNIT_ASSERT(!dynamic_cast< const SfxUInt32Item * 
>(aItemSet2.GetItem(SID_UNDO)));
1786 // first view, undo conflict
1787 pView1->GetState(aItemSet1);
1788 CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, 
aItemSet1.GetItemState(SID_UNDO));
1789 CPPUNIT_ASSERT(dynamic_cast< const SfxUInt32Item * 
>(aItemSet1.GetItem(SID_UNDO)));
>>> CID 1411569:  Null pointer dereferences  (FORWARD_NULL)
>>> Dynamic cast to pointer "dynamic_cast >> *>(aItemSet1.GetItem(5701, true))" can return "NULL".
1790 
CPPUNIT_ASSERT_EQUAL(static_cast(SwUndoId::CONFLICT), dynamic_cast< 
const SfxUInt32Item * >(aItemSet1.GetItem(SID_UNDO))->GetValue());
1791 }
1792 
1793 // Insert a character in the first view.
1794 SfxLokHelper::setView(nView1);
1795 pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'l', 0);

** CID 1411568:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1764 in 
SwTiledRenderingTest::testDisableUndoRepair()::[lambda() (instance 
1)]::operator ()() const()



*** CID 1411568:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1764 in 
SwTiledRenderingTest::testDisableUndoRepair()::[lambda() (instance 
1)]::operator ()() const()
1758 CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, 
aItemSet1.GetItemState(SID_UNDO));
1759 CPPUNIT_ASSERT(!dynamic_cast< const SfxUInt32Item * 
>(aItemSet1.GetItem(SID_UNDO)));
1760 // second view, undo conflict
1761 pView2->GetState(aItemSet2);
1762 CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, 
aItemSet2.GetItemState(SID_UNDO));
1763 CPPUNIT_ASSERT(dynamic_cast< const SfxUInt32Item * 
>(aItemSet2.GetItem(SID_UNDO)));
>>> CID 1411568:  Null pointer dereferences  (FORWARD_NULL)
>>> Dynamic cast to pointer "dynamic_cast >> *>(aItemSet2.GetItem(5701, true))" can return "NULL".
1764 
CPPUNIT_ASSERT_EQUAL(static_cast(SwUndoId::CONFLICT), dynamic_cast< 
const SfxUInt32Item * >(aItemSet2.GetItem(SID_UNDO))->GetValue());
1765 };
1766 
1767 // Insert a character in the first view.
1768 SfxLokHelper::setView(nView1);
1769 pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'k', 0);

** CID 1411567:(FORWARD_NULL)
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1740 in 
SwTiledRenderingTest::testDisableUndoRepair()()
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1740 in 
SwTiledRenderingTest::testDisableUndoRepair()()



*** CID 1411567:(FORWARD_NULL)
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1740 in 
SwTiledRenderingTest::testDisableUndoRepair()()
1734 SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
1735 ViewCallback aView1;
1736 SwView* pView1 = dynamic_cast(SfxViewShell::Current());
1737 int nView1 = SfxLokHelper::getView();
1738 SfxLokHelper::createView();
1739 ViewCallback aView2;
>>> CID 1411567:(FORWARD_NULL)
>>> Assigning: "pView2" = "dynamic_cast >> *>(SfxViewShell::Current())".
1740 SwView* pView2 = dynamic_cast(SfxViewShell::Current());
1741 int nView2 = SfxLokHelper::getView();
1742 
1743 {
1744 SfxItemSet 
aItemSet1(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), SID_UNDO, 
SID_UNDO);
1745 SfxItemSet 
aItemSet2(pXTextDocument->GetDocShell()->GetDoc()->GetAttrPool(), SID_UNDO, 
SID_UNDO);
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1740 in 
SwTiledRenderingTest::testDisableUndoRepair()()
1734 SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
1735 ViewCallback aView1;
1736 SwView* pView1 = dynamic_cast(SfxViewShell::Current());
1737 int nView1 = SfxLokHelper::getView();
1738 SfxLokHelper::createView();
17

New Defects reported by Coverity Scan for LibreOffice

2017-06-06 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 1412032:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/view/viewfunc.cxx: 1016 in ScViewFunc::ApplyPatternLines(const 
ScPatternAttr &, const SvxBoxItem *, const SvxBoxInfoItem *)()



*** CID 1412032:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/view/viewfunc.cxx: 1016 in ScViewFunc::ApplyPatternLines(const 
ScPatternAttr &, const SvxBoxItem *, const SvxBoxInfoItem *)()
1010 ScViewUtil::UnmarkFiltered( aFuncMark, pDoc );
1011 bool bRecord = true;
1012 if (!pDoc->IsUndoEnabled())
1013 bRecord = false;
1014 
1015 bool bRemoveAdjCellBorder = false;
>>> CID 1412032:  Null pointer dereferences  (FORWARD_NULL)
>>> Comparing "pNewOuter" to null implies that "pNewOuter" might be null.
1016 if( pNewOuter )
1017 bRemoveAdjCellBorder = pNewOuter->IsRemoveAdjacentCellBorder();
1018 ScRange aMarkRange, aMarkRangeWithEnvelope;
1019 aFuncMark.MarkToSimple();
1020 bool bMulti = aFuncMark.IsMultiMarked();
1021 if (bMulti)



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyrSjynORQuEIO5nyRsJn-2FdTvSPkAjHeFeD-2FgI7F-2BVOgmpxpQTj7llDo6KWTsnuKhLiGFZ0g3qmRJe0GZq5abP43Bg23H5Oxlgr1-2FpJ40tGxVNKB3YXGF8591kh9ggfCil4bppDtENLeaJKtEL2IPxtz7oMvnusHgoydeo0p6WhsI-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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyrSjynORQuEIO5nyRsJn-2FdaJMGXc2dSLjEajRtgusphK1kCj-2FIHBFBndFcdhvtA0tZJ5ZZ8sFKMQiU8B5fwKIlHicJqVYTiQdsCauGdx1fcLalFPxD3iiTZDZ4Coqd4ui9lkHOFE778qspchHh8cFzeD4VlbW7578eIhMeQBtuSA-3D

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


New Defects reported by Coverity Scan for LibreOffice

2017-06-09 Thread scan-admin

Hi,

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

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


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


** CID 1412146:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
/oox/source/vml/vmlformatting.cxx: 934 in 
oox::vml::TextpathModel::pushToPropMap(oox::drawingml::ShapePropertyMap &, 
const com::sun::star::uno::Reference &, const 
oox::GraphicHelper &) const()



*** CID 1412146:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
/oox/source/vml/vmlformatting.cxx: 934 in 
oox::vml::TextpathModel::pushToPropMap(oox::drawingml::ShapePropertyMap &, 
const com::sun::star::uno::Reference &, const 
oox::GraphicHelper &) const()
928 }
929 else if (aName == "font-size")
930 {
931 oox::OptValue aOptString(aValue);
932 sal_Int64 nEmu = lclGetEmu( rGraphicHelper, 
aOptString, 1 );
933 // 1 point = 1/72 inch = 12,700 EMU
>>> CID 1412146:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
>>> Dividing integer expressions "nEmu" and "12700L", and then converting 
>>> the integer quotient to type "float". Any remainder, or fractional part of 
>>> the quotient, is ignored.
934 float nSize = nEmu / 12700;
935 
936 uno::Reference 
xPropertySet(xShape, uno::UNO_QUERY);
937 xPropertySet->setPropertyValue("CharHeight", 
uno::makeAny(nSize));
938 }
939 }

** CID 1412145:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
/oox/source/export/vmlexport.cxx: 818 in 
oox::vml::VMLExport::Commit(EscherPropertyContainer &, const tools::Rectangle 
&)()



*** CID 1412145:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
/oox/source/export/vmlexport.cxx: 818 in 
oox::vml::VMLExport::Commit(EscherPropertyContainer &, const tools::Rectangle 
&)()
812 OUString aTextPathFont = 
SvxMSDffManager::MSDFFReadZString(aStream, aFont.nPropSize, true);
813 aStyle += "font-family:\"" + aTextPathFont 
+ "\"";
814 }
815 sal_uInt32 nSize;
816 if (rProps.GetOpt(ESCHER_Prop_gtextSize, nSize))
817 {
>>> CID 1412145:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
>>> Dividing integer expressions "(sal_Int32)nSize" and "65536", and then 
>>> converting the integer quotient to type "float". Any remainder, or 
>>> fractional part of the quotient, is ignored.
818 float nSizeF = (sal_Int32)nSize / 65536;
819 OUString aSize = OUString::number(nSizeF);
820 aStyle += ";font-size:" + aSize + "pt";
821 }
822 if (!aStyle.isEmpty())
823 pAttrList->add(XML_style, 
OUStringToOString(aStyle, RTL_TEXTENCODING_UTF8));

** CID 1405937:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/6.3.1/bits/shared_ptr_base.h: 371 in 
std::_Sp_counted_ptr::_M_dispose()()



*** CID 1405937:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/6.3.1/bits/shared_ptr_base.h: 371 in 
std::_Sp_counted_ptr::_M_dispose()()
365 public:
366   explicit
367   _Sp_counted_ptr(_Ptr __p) noexcept
368   : _M_ptr(__p) { }
369 
370   virtual void
>>> CID 1405937:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type 
>>> "boost::exception_detail::clone_impl
>>>  >" 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().
371   _M_dispose() noexcept
372   { delete _M_ptr; }
373 
374   virtual void
375   _M_destroy() noexcept
376   { delete this; }

** CID 1405935:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/6.3.1/bits/unique_ptr.h: 235 in std::unique_ptr>::~unique_ptr()()



*** CID 1405935:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/6.3.1/bits/unique_ptr.h: 235 in std::unique_ptr>::~unique_ptr()()
229   template, is_same<_Dp, 
default_delete<_Tp
231 unique_ptr(auto_ptr<_Up>&& __u) noexcept;
232 #endif
233 
234   /// Destructor, invokes the delete

New Defects reported by Coverity Scan for LibreOffice

2017-06-15 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 1412762:  Integer handling issues  (SIGN_EXTENSION)
/sw/source/core/doc/docsort.cxx: 944 in FlatFndBox::GetItemSet(unsigned short, 
unsigned short) const()



*** CID 1412762:  Integer handling issues  (SIGN_EXTENSION)
/sw/source/core/doc/docsort.cxx: 944 in FlatFndBox::GetItemSet(unsigned short, 
unsigned short) const()
938 }
939 
940 const SfxItemSet* FlatFndBox::GetItemSet(sal_uInt16 n_Col, sal_uInt16 
n_Row) const
941 {
942 OSL_ENSURE( ppItemSets.empty() || ( n_Col < nCols && n_Row < 
nRows), "invalid array access");
943 
>>> CID 1412762:  Integer handling issues  (SIGN_EXTENSION)
>>> Suspicious implicit sign extension: "this->nCols" with type 
>>> "sal_uInt16" (16 bits, unsigned) is promoted in "n_Row * this->nCols + 
>>> n_Col" to type "int" (32 bits, signed), then sign-extended to type 
>>> "unsigned long" (64 bits, unsigned).  If "n_Row * this->nCols + n_Col" is 
>>> greater than 0x7FFF, the upper bits of the result will all be 1.
944 return !ppItemSets.empty() ? ppItemSets[n_Row * nCols + 
n_Col].get() : nullptr;
945 }
946 
947 sal_uInt16 SwMovedBoxes::GetPos(const SwTableBox* pTableBox) const
948 {
949 std::vector::const_iterator it = 
std::find(mBoxes.begin(), mBoxes.end(), pTableBox);
950 return it == mBoxes.end() ? USHRT_MAX : it - mBoxes.begin();
951 }
952 

** CID 1412761:  Integer handling issues  (SIGN_EXTENSION)
/sw/source/core/doc/docsort.cxx: 944 in FlatFndBox::GetItemSet(unsigned short, 
unsigned short) const()



*** CID 1412761:  Integer handling issues  (SIGN_EXTENSION)
/sw/source/core/doc/docsort.cxx: 944 in FlatFndBox::GetItemSet(unsigned short, 
unsigned short) const()
938 }
939 
940 const SfxItemSet* FlatFndBox::GetItemSet(sal_uInt16 n_Col, sal_uInt16 
n_Row) const
941 {
942 OSL_ENSURE( ppItemSets.empty() || ( n_Col < nCols && n_Row < 
nRows), "invalid array access");
943 
>>> CID 1412761:  Integer handling issues  (SIGN_EXTENSION)
>>> Suspicious implicit sign extension: "n_Row" with type "sal_uInt16" (16 
>>> bits, unsigned) is promoted in "n_Row * this->nCols + n_Col" to type "int" 
>>> (32 bits, signed), then sign-extended to type "unsigned long" (64 bits, 
>>> unsigned).  If "n_Row * this->nCols + n_Col" is greater than 0x7FFF, 
>>> the upper bits of the result will all be 1.
944 return !ppItemSets.empty() ? ppItemSets[n_Row * nCols + 
n_Col].get() : nullptr;
945 }
946 
947 sal_uInt16 SwMovedBoxes::GetPos(const SwTableBox* pTableBox) const
948 {
949 std::vector::const_iterator it = 
std::find(mBoxes.begin(), mBoxes.end(), pTableBox);
950 return it == mBoxes.end() ? USHRT_MAX : it - mBoxes.begin();
951 }
952 



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyAOVJA5HwneUgrwoAsm-2FAxxIXj1CwTjMAZKOF-2F5jxAjJtalgLfGawDcv69jgwJEYC5T64H4tjS-2BXv-2Be6rqpV7EpMPUASqgSA0wvwVilD1O1fXsA5AKM3fwhNoX7S9fZ2p0qBtsGmyz-2F-2BEHyypwEcKw9QFHw0m4gQQaYQO5EFyDAg-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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyAOVJA5HwneUgrwoAsm-2FAx5O7EtYraYCnFRbnrbk2VytYBDeCi5QRg5ayZK76bAGD9he8wwaI6lbM8gI40SnZc7OtgeNGOVh7btsdkWJj8pMmNQaFxBLsZPdOUXoUTrdkGIHjJf4aNzSJaIM4pwlTypQNGlBuMemsrUTDGd-2FDWD8-3D

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


New Defects reported by Coverity Scan for LibreOffice

2017-04-07 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.
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 8 of 8 defect(s)


** CID 1404884:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/crsr/crsrsh.cxx: 1426 in 
SwNotifyAccAboutInvalidTextSelections::~SwNotifyAccAboutInvalidTextSelections()()



*** CID 1404884:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/crsr/crsrsh.cxx: 1426 in 
SwNotifyAccAboutInvalidTextSelections::~SwNotifyAccAboutInvalidTextSelections()()
1420 
1421 public:
1422 explicit SwNotifyAccAboutInvalidTextSelections( SwCursorShell& 
_rCursorSh )
1423 : mrCursorSh( _rCursorSh )
1424 {}
1425 
>>> CID 1404884:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "o3tl::divide_by_zero" 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().
1426 ~SwNotifyAccAboutInvalidTextSelections()
1427 {
1428 mrCursorSh.InvalidateAccessibleParaTextSelection();
1429 }
1430 };
1431 

** CID 1404883:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/app/scmod.cxx: 199 in ScModule::~ScModule()()



*** CID 1404883:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/app/scmod.cxx: 199 in ScModule::~ScModule()()
193 SetPool( pMessagePool );
194 ScGlobal::InitTextHeight( pMessagePool );
195 
196 StartListening( *SfxGetpApp() );   // for 
SfxHintId::Deinitializing
197 }
198 
>>> CID 1404883:  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().
199 ScModule::~ScModule()
200 {
201 OSL_ENSURE( !pSelTransfer, "Selection Transfer object not deleted" 
);
202 
203 // InputHandler does not need to be deleted (there's none in the 
App anymore)
204 

** CID 1404882:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/docnode/node.cxx: 1006 in SwContentNode::~SwContentNode()()



*** CID 1404882:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/docnode/node.cxx: 1006 in SwContentNode::~SwContentNode()()
1000 SwNode( rWhere, nNdType ),
1001 m_pCondColl( nullptr ),
1002 mbSetModifyAtAttr( false )
1003 {
1004 }
1005 
>>> CID 1404882:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "o3tl::divide_by_zero" 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().
1006 SwContentNode::~SwContentNode()
1007 {
1008 // The base class SwClient of SwFrame excludes itself from the 
dependency list!
1009 // Thus, we need to delete all Frames in the dependency list.
1010 DelFrames(false);
1011 

** CID 1404881:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/layout/anchoreddrawobject.cxx: 62 in 
SwPosNotify::~SwPosNotify()()



*** CID 1404881:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/layout/anchoreddrawobject.cxx: 62 in 
SwPosNotify::~SwPosNotify()()
56 {
57 maOldObjRect = mpAnchoredDrawObj->GetObjRect();
58 // --> #i35640# - determine correct page frame
59 mpOldPageFrame = mpAnchoredDrawObj->GetPageFrame();
60 }
61 
>>> CID 1404881:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "o3tl::divide_by_zero" 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().
62 SwPosNotify::~SwPosNotify()
63 {
64 if ( maOldObjRect != mpAnchoredDrawObj->GetObjRect() )
65 {
66 if( maOldObjRect.HasArea() && mpOldPageFrame )
67 {

** CID 1404880:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/docnode/ndtbl.cxx: 2362 in SwTableNode::~SwTableNode()()



*** CID 1404880:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/docno

New Defects reported by Coverity Scan for LibreOffice

2017-04-09 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.
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 3 of 3 defect(s)


** CID 1404932:  Incorrect expression  (USELESS_CALL)



*** CID 1404932:  Incorrect expression  (USELESS_CALL)
/sd/source/ui/view/viewshe2.cxx: 366 in sd::ViewShell::GetZoom() const()
360 }
361 
362 long ViewShell::GetZoom() const
363 {
364 if (mpContentWindow)
365 {
>>> CID 1404932:  Incorrect expression  (USELESS_CALL)
>>> Calling "this->mpContentWindow->GetZoom()" is only useful for its 
>>> return value, which is ignored.
366 mpContentWindow->GetZoom();
367 }
368 
369 return 0;
370 }
371 

** CID 1404931:  Code maintainability issues  (UNUSED_VALUE)
/unotools/source/ucbhelper/localfilehelper.cxx: 147 in utl::removeTree(const 
rtl::OUString &)()



*** CID 1404931:  Code maintainability issues  (UNUSED_VALUE)
/unotools/source/ucbhelper/localfilehelper.cxx: 147 in utl::removeTree(const 
rtl::OUString &)()
141 SAL_WARN_IF(
142 rc != osl::FileBase::E_None, "desktop.app",
143 "cannot remove file " << stat.getFileURL() << ": " << 
+rc);
144 }
145 }
146 if (dir.isOpen()) {
>>> CID 1404931:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value from "dir.close()" to "rc" here, but that stored value 
>>> is overwritten before it can be used.
147 rc = dir.close();
148 SAL_WARN_IF(
149 rc != osl::FileBase::E_None, "desktop.app",
150 "cannot close directory " << dir.getURL() << ": " << +rc);
151 }
152 rc = osl::Directory::remove(url);

** CID 1404930:  Code maintainability issues  (UNUSED_VALUE)
/unotools/source/ucbhelper/localfilehelper.cxx: 140 in utl::removeTree(const 
rtl::OUString &)()



*** CID 1404930:  Code maintainability issues  (UNUSED_VALUE)
/unotools/source/ucbhelper/localfilehelper.cxx: 140 in utl::removeTree(const 
rtl::OUString &)()
134 SAL_WARN( "desktop.app", "cannot stat in directory " << 
dir.getURL() << ": " << +rc);
135 continue;
136 }
137 if (stat.getFileType() == osl::FileStatus::Directory) { //TODO: 
symlinks
138 removeTree(stat.getFileURL());
139 } else {
>>> CID 1404930:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value from 
>>> "osl::File::remove(rtl::OUString(stat.getFileURL()))" to "rc" here, but 
>>> that stored value is overwritten before it can be used.
140 rc = osl::File::remove(stat.getFileURL());
141 SAL_WARN_IF(
142 rc != osl::FileBase::E_None, "desktop.app",
143 "cannot remove file " << stat.getFileURL() << ": " << 
+rc);
144 }
145 }



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyh4wD7vwNcRrQBRngBLK6WYcUr7VbHch80tIbGW9bvnJ7WP1OQf4etMDJl50HxfIfPcxg5-2BX-2Btnx-2FV-2FU2N-2Ff7-2BYiOGroLkXU-2Bolpo7m6hlq4gCyrRYBm4UD2brrndr7E3r4-2BJGzfBYOU494LV6RJulD3zKTioU4tW-2BIiUjU91PhY-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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyh4wD7vwNcRrQBRngBLK6WWtEuXMKidQq4KZNjXL9hnVm89D0ISHrpY7fugc2z1DgdUFO470siN0Wu5gIXDep5ykjKQSvTHlVam3b-2FfOGZKDobhCkjrL0lUz2yDm-2Bm51T8gRKqIRzOyfcnv-2FpRzdqhADHlUptiEDm1q-2BQ1w5Zi1U-3D

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


New Defects reported by Coverity Scan for LibreOffice

2017-04-15 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.
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 10 of 10 defect(s)


** CID 1405158:  Incorrect expression  (SIZEOF_MISMATCH)
/hwpfilter/source/hpara.cxx: 80 in HWPPara::HWPPara()()



*** CID 1405158:  Incorrect expression  (SIZEOF_MISMATCH)
/hwpfilter/source/hpara.cxx: 80 in HWPPara::HWPPara()()
74 , contain_cshape(0)
75 , etcflag(0)
76 , ctrlflag(0)
77 , pstyno(0)
78 , cshape(new CharShape)
79 {
>>> CID 1405158:  Incorrect expression  (SIZEOF_MISMATCH)
>>> Passing argument "this->cshape.get()" of type "CharShape *" and 
>>> argument "16UL" ("sizeof (this->cshape)") to function "memset" is 
>>> suspicious because a multiple of "sizeof (CharShape) /*40*/" is expected.
80 memset(cshape.get(), 0, sizeof(cshape));
81 memset(&pshape, 0, sizeof(pshape));
82 }
83 
84 HWPPara::~HWPPara()
85 {

** CID 1405157:  Error handling issues  (CHECKED_RETURN)
/sc/qa/unit/ucalc_formula.cxx: 2291 in Test::testFormulaRefUpdateMoveUndo2()()



*** CID 1405157:  Error handling issues  (CHECKED_RETURN)
/sc/qa/unit/ucalc_formula.cxx: 2291 in Test::testFormulaRefUpdateMoveUndo2()()
2285 const ScFormulaCell* pFC = 
m_pDoc->GetFormulaCell(ScAddress(3,0,0));
2286 CPPUNIT_ASSERT(pFC);
2287 CPPUNIT_ASSERT_EQUAL(SCROW(2), pFC->GetSharedLength());
2288 
2289 // Drag A1:B1 into A2:B2 thereby overwriting the old A2:B2 content.
2290 ScDocFunc& rFunc = getDocShell().GetDocFunc();
>>> CID 1405157:  Error handling issues  (CHECKED_RETURN)
>>> Calling "MoveBlock" without checking return value (as is done elsewhere 
>>> 20 out of 21 times).
2291 rFunc.MoveBlock(ScRange(0,0,0,1,0,0), ScAddress(0,1,0), true, 
true, false, true);
2292 
2293 std::vector> aCheckAfter = {
2294 { nullptr, nullptr,"10", "3" },
2295 { "1", "2", "3", "3" },
2296 { "3", nullptr, nullptr, nullptr },

** CID 1399432:  Error handling issues  (UNCAUGHT_EXCEPT)
/slideshow/source/engine/eventqueue.cxx: 58 in 
slideshow::internal::EventQueue::~EventQueue()()



*** CID 1399432:  Error handling issues  (UNCAUGHT_EXCEPT)
/slideshow/source/engine/eventqueue.cxx: 58 in 
slideshow::internal::EventQueue::~EventQueue()()
52   maNextEvents(),
53   maNextNextEvents(),
54   mpTimer( pPresTimer )
55 {
56 }
57 
>>> CID 1399432:  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().
58 EventQueue::~EventQueue()
59 {
60 // add in all that have been added explicitly for this round:
61 EventEntryVector::const_iterator const iEnd( 
maNextEvents.end() );
62 for ( EventEntryVector::const_iterator iPos( 
maNextEvents.begin() );
63   iPos != iEnd; ++iPos )

** CID 1399428:  Error handling issues  (UNCAUGHT_EXCEPT)
/slideshow/source/engine/activitiesqueue.cxx: 48 in 
slideshow::internal::ActivitiesQueue::~ActivitiesQueue()()



*** CID 1399428:  Error handling issues  (UNCAUGHT_EXCEPT)
/slideshow/source/engine/activitiesqueue.cxx: 48 in 
slideshow::internal::ActivitiesQueue::~ActivitiesQueue()()
42 maCurrentActivitiesWaiting(),
43 maCurrentActivitiesReinsert(),
44 maDequeuedActivities()
45 {
46 }
47 
>>> CID 1399428:  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().
48 ActivitiesQueue::~ActivitiesQueue()
49 {
50 // dispose all queue entries
51 try
52 {
53 for( const auto& pActivity : maCurrentActivitiesWaiting )

** CID 1399425:  Error handling issues  (UNCAUGHT_EXCEPT)
/slideshow/source/engine/shapesubset.cxx: 75 in 
slideshow::internal::S

New Defects reported by Coverity Scan for LibreOffice

2017-04-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.
30 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 1405196:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/edit/edws.cxx: 155 in SwActContext::~SwActContext()()



*** CID 1405196:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/edit/edws.cxx: 155 in SwActContext::~SwActContext()()
149 SwActContext::SwActContext(SwEditShell *pShell)
150 : m_rShell(*pShell)
151 {
152 m_rShell.StartAction();
153 }
154 
>>> CID 1405196:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type 
>>> "boost::exception_detail::clone_impl
>>>  >" 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().
155 SwActContext::~SwActContext()
156 {
157 m_rShell.EndAction();
158 }
159 
160 SwMvContext::SwMvContext(SwEditShell *pShell)

** CID 1405195:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/text/porfld.cxx: 796 in SwGrfNumPortion::~SwGrfNumPortion()()



*** CID 1405195:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/text/porfld.cxx: 796 in SwGrfNumPortion::~SwGrfNumPortion()()
790 nFixWidth = Width();
791 nGrfHeight = rGrfSize.Height() + 2 * GRFNUM_SECURE;
792 Height( sal_uInt16(nGrfHeight) );
793 bNoPaint = false;
794 }
795 
>>> CID 1405195:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type 
>>> "boost::exception_detail::clone_impl
>>>  >" 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().
796 SwGrfNumPortion::~SwGrfNumPortion()
797 {
798 if ( IsAnimated() )
799 {
800 Graphic* pGraph = const_cast(pBrush->GetGraphic());
801 if (pGraph)

** CID 1405194:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/txtnode/atrftn.cxx: 258 in SwTextFootnote::~SwTextFootnote()()



*** CID 1405194:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/txtnode/atrftn.cxx: 258 in SwTextFootnote::~SwTextFootnote()()
252 , m_nSeqNo( USHRT_MAX )
253 {
254 rAttr.m_pTextAttr = this;
255 SetHasDummyChar(true);
256 }
257 
>>> CID 1405194:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type 
>>> "boost::exception_detail::clone_impl
>>>  >" 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().
258 SwTextFootnote::~SwTextFootnote()
259 {
260 SetStartNode( nullptr );
261 }
262 
263 void SwTextFootnote::SetStartNode( const SwNodeIndex *pNewNode, bool 
bDelNode )

** CID 1405193:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/docnode/node.cxx: 1006 in SwContentNode::~SwContentNode()()



*** CID 1405193:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/docnode/node.cxx: 1006 in SwContentNode::~SwContentNode()()
1000 SwNode( rWhere, nNdType ),
1001 m_pCondColl( nullptr ),
1002 mbSetModifyAtAttr( false )
1003 {
1004 }
1005 
>>> CID 1405193:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type 
>>> "boost::exception_detail::clone_impl
>>>  >" 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().
1006 SwContentNode::~SwContentNode()
1007 {
1008 // The base class SwClient of SwFrame excludes itself from the 
dependency list!
1009 // Thus, we need to delete all Frames in the dependency list.
1010 DelFrames(false);
1011 

** CID 1405192:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/undo/undel.cxx: 519 in SwUndoDelete::~SwUndoDelete()()



*** CID 1405192:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/undo/undel.cxx: 519 in SwUndoDelete::~SwUndoDelete()()
513 pDelTextNd->EraseText( pStt->nContent, 1 );
514 
515 m_bGroup = true;
516 return true;
517 }
518 
>>> CID 1405192:  Error h

New Defects reported by Coverity Scan for LibreOffice

2017-04-19 Thread scan-admin

Hi,

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

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


** CID 1405233:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/doc/list.cxx: 99 in SwListImpl::~SwListImpl()()



*** CID 1405233:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/doc/list.cxx: 99 in SwListImpl::~SwListImpl()()
93 pNode = rNodes[nIndex];
94 }
95 }
96 while ( pNode != &rNodes.GetEndOfContent() );
97 }
98 
>>> CID 1405233:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" 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().
99 SwListImpl::~SwListImpl()
100 {
101 tListTrees::iterator aNumberTreeIter;
102 for ( aNumberTreeIter = maListTrees.begin();
103   aNumberTreeIter != maListTrees.end();
104   ++aNumberTreeIter )

** CID 1405232:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/docnode/node.cxx: 1006 in SwContentNode::~SwContentNode()()



*** CID 1405232:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/docnode/node.cxx: 1006 in SwContentNode::~SwContentNode()()
1000 SwNode( rWhere, nNdType ),
1001 m_pCondColl( nullptr ),
1002 mbSetModifyAtAttr( false )
1003 {
1004 }
1005 
>>> CID 1405232:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" 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().
1006 SwContentNode::~SwContentNode()
1007 {
1008 // The base class SwClient of SwFrame excludes itself from the 
dependency list!
1009 // Thus, we need to delete all Frames in the dependency list.
1010 DelFrames(false);
1011 

** CID 1405231:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/layout/anchoreddrawobject.cxx: 62 in 
SwPosNotify::~SwPosNotify()()



*** CID 1405231:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/layout/anchoreddrawobject.cxx: 62 in 
SwPosNotify::~SwPosNotify()()
56 {
57 maOldObjRect = mpAnchoredDrawObj->GetObjRect();
58 // --> #i35640# - determine correct page frame
59 mpOldPageFrame = mpAnchoredDrawObj->GetPageFrame();
60 }
61 
>>> CID 1405231:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" 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().
62 SwPosNotify::~SwPosNotify()
63 {
64 if ( maOldObjRect != mpAnchoredDrawObj->GetObjRect() )
65 {
66 if( maOldObjRect.HasArea() && mpOldPageFrame )
67 {

** CID 1405230:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/text/redlnitr.cxx: 185 in SwRedlineItr::~SwRedlineItr()()



*** CID 1405230:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/text/redlnitr.cxx: 185 in SwRedlineItr::~SwRedlineItr()()
179 pExt = new SwExtend( *pArr, nExtStart );
180 else
181 pExt = nullptr;
182 Seek (rFnt, 0, COMPLETE_STRING);
183 }
184 
>>> CID 1405230:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" 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().
185 SwRedlineItr::~SwRedlineItr()
186 {
187 Clear( nullptr );
188 delete pSet;
189 delete pExt;
190 }

** CID 1405229:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/undo/undel.cxx: 519 in SwUndoDelete::~SwUndoDelete()()



*** CID 1405229:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/undo/undel.cxx: 519 in SwUndoDelete::~SwUndoDelete()()
513 pDelTextNd->EraseText( pStt->nContent, 1 );
514 
515 m_bGroup = true;
516 return true;
517 }
518 
>>> CID 1405229:  Error handling issues  (UNCAUGHT_EXCEPT)

New Defects reported by Coverity Scan for LibreOffice

2017-08-04 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 1416138:  Control flow issues  (MISSING_RESTORE)
/connectivity/source/drivers/component/CTable.cxx: 211 in 
connectivity::component::OComponentTable::seekRow(connectivity::IResultSetHelper::Movement,
 int, int &)()



*** CID 1416138:  Control flow issues  (MISSING_RESTORE)
/connectivity/source/drivers/component/CTable.cxx: 211 in 
connectivity::component::OComponentTable::seekRow(connectivity::IResultSetHelper::Movement,
 int, int &)()
205 m_nFilePos = 0;
206 break;
207 case IResultSetHelper::BOOKMARK:
208 m_nFilePos = nTempPos;   // previous position
209 }
210 //  aStatus.Set(SDB_STAT_NO_DATA_FOUND);
>>> CID 1416138:  Control flow issues  (MISSING_RESTORE)
>>> Value of non-local "this->m_nFilePos" that was saved in "nTempPos" is 
>>> not restored as it was along other paths.
211 return false;
212 
213 End:
214 nCurPos = m_nFilePos;
215 return true;
216 }

** CID 1416137:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/view/drawvie4.cxx: 204 in ::getOleSourceRanges(const 
SdrMarkList &, bool &, bool &, std::vector> *, 
ScDocument *)()



*** CID 1416137:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/ui/view/drawvie4.cxx: 204 in ::getOleSourceRanges(const 
SdrMarkList &, bool &, bool &, std::vector> *, 
ScDocument *)()
198 return;
199 }
200 
201 // Get all cell ranges that are referenced by the selected chart 
objects.
202 void getOleSourceRanges(const SdrMarkList& rMarkList, bool& rAnyOle, 
bool& rOneOle, std::vector* pRanges = nullptr, ScDocument* pDoc = 
nullptr )
203 {
>>> CID 1416137:  Null pointer dereferences  (FORWARD_NULL)
>>> Comparing "pDoc" to null implies that "pDoc" might be null.
204 bool bCalcSourceRanges = pRanges && pDoc;
205 std::vector aRangeReps;
206 rAnyOle = rOneOle = false;
207 const size_t nCount = rMarkList.GetMarkCount();
208 for (size_t i=0; i::getOleSourceRanges(const 
SdrMarkList &, bool &, bool &, std::vector> *, 
ScDocument *)()
/sc/source/ui/view/drawvie4.cxx: 204 in ::getOleSourceRanges(const 
SdrMarkList &, bool &, bool &, std::vector> *, 
ScDocument *)()



*** CID 1416135:(FORWARD_NULL)
/sc/source/ui/view/drawvie4.cxx: 204 in ::getOleSourceRanges(const 
SdrMarkList &, bool &, bool &, std::vector> *, 
ScDocument *)()
198 return;
199 }
200 
201 // Get all cell ranges that are referenced by the selected chart 
objects.
202 void getOleSourceRanges(const SdrMarkList& rMarkList, bool& rAnyOle, 
bool& rOneOle, std::vector* pRanges = nullptr, ScDocument* pDoc = 
nullptr )
203 {
>>> CID 1416135:(FORWARD_NULL)
>>> Comparing "pRanges" to null implies that "pRanges" might be null.
204 bool bCalcSourceRanges = pRanges && pDoc;
205 std::vector aRangeReps;
206 rAnyOle = rOneOle = false;
207 const size_t nCount = rMarkList.GetMarkCount();
208 for (size_t i=0; i::getOleSourceRanges(const 
SdrMarkList &, bool &, bool &, std::vector> *, 
ScDocument *)()
198 return;
199 }
200 
201 // Get all cell ranges that are referenced by the selected chart 
objects.
202 void getOleSourceRanges(const SdrMarkList& rMarkList, bool& rAnyOle, 
bool& rOneOle, std::vector* pRanges = nullptr, ScDocument* pDoc = 
nullptr )
203 {
>>> CID 1416135:(FORWARD_NULL)
>>> Comparing "pRanges" to null implies that "pRanges" might be null.
204 bool bCalcSourceRanges = pRanges && pDoc;
205 std::vector aRangeReps;
206 rAnyOle = rOneOle = false;
207 const size_t nCount = rMarkList.GetMarkCount();
208 for (size_t i=0; i::ContentIdxStoreImpl::RestoreBkmks(SwDoc *, std::function &)()



*** CID 1416133:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/doc/CntntIdxStore.cxx: 272 in 
::ContentIdxStoreImpl::RestoreBkmks(SwDoc *, std::function &)()
266 SetRightMarkPos(pMark, aEntry.m_bOther, &aNewPos);
267 }
268 }
269 if (!m_aBkmkEntries.empty())
270 {   // tdf#105705 sort bookmarks because SaveBkmks special handling 
of
271 // "bMarkPosEqual" may destroy sort order
>>> CID 1416133:  Null pointer dereferences  (FORWARD_NULL)
>

New Defects reported by Coverity Scan for LibreOffice

2015-06-12 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.
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 5 of 5 defect(s)


** CID 1306215:  Uninitialized members  (UNINIT_CTOR)
/libreofficekit/source/gtk/tilebuffer.hxx: 54 in Tile::Tile()()



*** CID 1306215:  Uninitialized members  (UNINIT_CTOR)
/libreofficekit/source/gtk/tilebuffer.hxx: 54 in Tile::Tile()()
48This class represents a single tile in the tile buffer.
49It encloses a reference to GdkPixBuf containing the pixel data of the 
tile.
50 */
51 class Tile
52 {
53  public:
>>> CID 1306215:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_pBuffer" is not initialized in this 
>>> constructor nor in any functions that it calls.
54 Tile() : valid(false) {}
55 ~Tile() { }
56 
57 /**
58Tells if this tile is valid or not. Initialised to 0 (invalid) 
during
59object creation.

** CID 1306214:  Uninitialized members  (UNINIT_CTOR)
/vcl/qa/cppunit/lifecycle.cxx: 214 in LeakTestObject::LeakTestObject()()



*** CID 1306214:  Uninitialized members  (UNINIT_CTOR)
/vcl/qa/cppunit/lifecycle.cxx: 214 in LeakTestObject::LeakTestObject()()
208 
209 class LeakTestObject
210 {
211 boolmbDeleted;
212 VclPtr mxRef;
213 void   *mpRef;
>>> CID 1306214:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mpRef" is not initialized in this constructor 
>>> nor in any functions that it calls.
214 LeakTestObject() {}
215 public:
216 template static LeakTestObject *
217 Create(Arg &&... arg)
218 {
219 LeakTestObject *pNew = new LeakTestObject();

** CID 1306212:  Program hangs  (INFINITE_LOOP)
/vcl/qa/cppunit/timer.cxx: 122 in TimerTest::testIdleMainloop()()



*** CID 1306212:  Program hangs  (INFINITE_LOOP)
/vcl/qa/cppunit/timer.cxx: 122 in TimerTest::testIdleMainloop()()
116 
117 // tdf#91727
118 void TimerTest::testIdleMainloop()
119 {
120 bool bTriggered = false;
121 IdleBool aTest( bTriggered );
>>> CID 1306212:  Program hangs  (INFINITE_LOOP)
>>> If "bTriggered" is initially false then it will remain false.
122 while (!bTriggered)
123 {
124 ImplSVData* pSVData = ImplGetSVData();
125 
126 // can't test this via Application::Yield since this
127 // also processes all tasks directly via the scheduler.

** CID 1306211:  Control flow issues  (DEADCODE)
/connectivity/source/drivers/file/fanalyzer.cxx: 134 in 
connectivity::file::OSQLAnalyzer::bindRow(std::vector> &, const 
rtl::Reference &, std::list, std::allocator>> *, 
std::allocator, 
std::allocator>> *>> &)()



*** CID 1306211:  Control flow issues  (DEADCODE)
/connectivity/source/drivers/file/fanalyzer.cxx: 134 in 
connectivity::file::OSQLAnalyzer::bindRow(std::vector> &, const 
rtl::Reference &, std::list, std::allocator>> *, 
std::allocator, 
std::allocator>> *>> &)()
128 {
129 OOperandAttr* pAttr = PTR_CAST(OOperandAttr,(*aIter));
130 if (pAttr)
131 {
132 if (pEvaluateSet)
133 {
>>> CID 1306211:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "_rEvaluateSetList->push_bac...".
134 _rEvaluateSetList.push_back(pEvaluateSet);
135 pEvaluateSet = NULL;
136 }
137 pAttr->bindValue(_pRow);
138 }
139 }

** CID 1269539:(RESOURCE_LEAK)
/usr/include/boost/iostreams/chain.hpp: 259 in 
boost::iostreams::detail::chain_base, std::allocator>, char, 
std::char_traits, std::allocator, 
boost::iostreams::output>::push_impl>>(const
 T1 &, long, long)()
/usr/include/boost/iostreams/chain.hpp: 259 in 
boost::iostreams::detail::chain_base, std::allocator>, char, 
std::char_traits, std::allocator, 
boost::iostreams::output>::push_impl, std::allocator>>>(const T1 &, long, long)()



*** CID 1269539:(RESOURCE_LEAK)
/usr/include/boost/iostreams/chain.hpp: 259 in 
boost::iostreams::detail::chain_base, std::allocator>, char, 
std::char_traits, std::allocator,

New Defects reported by Coverity Scan for LibreOffice

2015-06-18 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 1307698:  Uninitialized members  (UNINIT_CTOR)
/reportdesign/source/ui/dlg/dlgpage.cxx: 72 in 
rptui::ORptPageDialog::ORptPageDialog(vcl::Window *, const SfxItemSet *, const 
rtl::OUString &)()



*** CID 1307698:  Uninitialized members  (UNINIT_CTOR)
/reportdesign/source/ui/dlg/dlgpage.cxx: 72 in 
rptui::ORptPageDialog::ORptPageDialog(vcl::Window *, const SfxItemSet *, const 
rtl::OUString &)()
66 else
67 OSL_FAIL("Unknown page id");
68 
69 SvtCJKOptions aCJKOptions;
70 if ( !aCJKOptions.IsDoubleLinesEnabled() )
71 RemoveTabPage("asianlayout");
>>> CID 1307698:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_nCharBgdId" is not initialized in this 
>>> constructor nor in any functions that it calls.
72 }
73 
74 void ORptPageDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
75 {
76 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
77 if (nId == m_nCharBgdId)

** CID 1307697:  Null pointer dereferences  (NULL_RETURNS)



*** CID 1307697:  Null pointer dereferences  (NULL_RETURNS)
/cui/source/tabpages/backgrnd.cxx: 715 in 
SvxBackgroundTabPage::FillItemSet(SfxItemSet *)()
709 const bool  bWasLink = (NULL != 
rOldItem.GetGraphicLink() );
710 
711 
712 if ( !bIsLink && !bIsGraphicValid )
713 bIsGraphicValid = LoadLinkedGraphic_Impl();
714 
>>> CID 1307697:  Null pointer dereferences  (NULL_RETURNS)
>>> Dereferencing a pointer that might be null 
>>> "rOldItem->GetGraphic(rtl::OUString())" when calling "GetBitmap".
715 if (  eNewPos != eOldPos
716 || bIsLink != bWasLink
717 || ( bWasLink  && rOldItem.GetGraphicLink()
718!= aBgdGraphicPath )
719 || ( !bWasLink && rOldItem.GetGraphic()->GetBitmap()
720!= aBgdGraphic.GetBitmap() )

** CID 1307696:  Error handling issues  (CHECKED_RETURN)
/framework/source/uifactory/menubarfactory.cxx: 127 in 
framework::MenuBarFactory::CreateUIElement(const rtl::OUString &, const 
com::sun::star::uno::Sequence &, const 
char *, const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &)()



*** CID 1307696:  Error handling issues  (CHECKED_RETURN)
/framework/source/uifactory/menubarfactory.cxx: 127 in 
framework::MenuBarFactory::CreateUIElement(const rtl::OUString &, const 
com::sun::star::uno::Sequence &, const 
char *, const rtl::OUString &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &)()
121 OUString aModuleIdentifier = xModuleManager->identify( 
Reference( xFrame, UNO_QUERY ) );
122 if ( !aModuleIdentifier.isEmpty() )
123 {
124 Reference< XModuleUIConfigurationManagerSupplier > 
xModuleCfgSupplier =
125 theModuleUIConfigurationManagerSupplier::get( 
_rxContext );
126 xCfgMgr = 
xModuleCfgSupplier->getUIConfigurationManager( aModuleIdentifier );
>>> CID 1307696:  Error handling issues  (CHECKED_RETURN)
>>> Calling "hasSettings" without checking return value (as is done 
>>> elsewhere 16 out of 17 times).
127 xCfgMgr->hasSettings( aResourceURL );
128 }
129 }
130 }
131 
132 PropertyValue aPropValue;



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2015-06-27 Thread scan-admin

Hi,

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

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


** CID 1308604:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/dialog/templdlg.cxx: 107 in 
::StyleLBoxString::StyleLBoxString(SvTreeListEntry *, unsigned short, 
const rtl::OUString &, const SfxStyleFamily &)()



*** CID 1308604:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/dialog/templdlg.cxx: 107 in 
::StyleLBoxString::StyleLBoxString(SvTreeListEntry *, unsigned short, 
const rtl::OUString &, const SfxStyleFamily &)()
101 };
102 
103 
104 StyleLBoxString::StyleLBoxString(SvTreeListEntry* pEntry, sal_uInt16 
nFlags, const OUString& sText, const SfxStyleFamily& eStyleFamily)
105 : SvLBoxString(pEntry, nFlags, sText)
106 , meStyleFamily(eStyleFamily)
>>> CID 1308604:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mpViewData" is not initialized in this 
>>> constructor nor in any functions that it calls.
107 {}
108 
109 StyleLBoxString::~StyleLBoxString()
110 {}
111 
112 void StyleLBoxString::InitViewData(SvTreeListBox* pView, 
SvTreeListEntry* pEntry, SvViewDataItem* pViewData)

** CID 1308603:  Uninitialized members  (UNINIT_CTOR)
/vcl/generic/print/prtsetup.cxx: 92 in RTSDialog::RTSDialog(const 
psp::PrinterInfo &, vcl::Window *)()



*** CID 1308603:  Uninitialized members  (UNINIT_CTOR)
/vcl/generic/print/prtsetup.cxx: 92 in RTSDialog::RTSDialog(const 
psp::PrinterInfo &, vcl::Window *)()
86 SetText(aTitle.replaceAll("%s", m_aJobData.m_aPrinterName));
87 
88 m_pTabControl->SetActivatePageHdl( LINK( this, RTSDialog, 
ActivatePage ) );
89 m_pOKButton->SetClickHdl( LINK( this, RTSDialog, ClickButton ) );
90 m_pCancelButton->SetClickHdl( LINK( this, RTSDialog, ClickButton ) );
91 ActivatePage(m_pTabControl);
>>> CID 1308603:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mbDataModified" is not initialized in this 
>>> constructor nor in any functions that it calls.
92 }
93 
94 RTSDialog::~RTSDialog()
95 {
96 disposeOnce();
97 }

** CID 1308602:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx: 1605 in 
ScAccessibleDocumentPagePreview::createAccessibleDescription()()



*** CID 1308602:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx: 1605 in 
ScAccessibleDocumentPagePreview::createAccessibleDescription()()
1599 {
1600 return css::uno::Sequence();
1601 }
1602 
1603 //=  internal  

1604 
>>> CID 1308602:  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().
1605 OUString SAL_CALL 
ScAccessibleDocumentPagePreview::createAccessibleDescription()
1606 throw (uno::RuntimeException)
1607 {
1608 OUString sDescription = 
OUString(ScResId(STR_ACC_PREVIEWDOC_DESCR));
1609 return sDescription;
1610 }

** CID 1308601:  Error handling issues  (UNCAUGHT_EXCEPT)
/connectivity/source/drivers/firebird/Driver.cxx: 51 in 
connectivity::firebird::FirebirdDriver_CreateInstance(const 
com::sun::star::uno::Reference &)()



*** CID 1308601:  Error handling issues  (UNCAUGHT_EXCEPT)
/connectivity/source/drivers/firebird/Driver.cxx: 51 in 
connectivity::firebird::FirebirdDriver_CreateInstance(const 
com::sun::star::uno::Reference &)()
45 using namespace connectivity::firebird;
46 
47 namespace connectivity
48 {
49 namespace firebird
50 {
>>> CID 1308601:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list 
>>> "throw(com::sun::star::uno::Exception)" doesn't allow it to be thrown. This 
>>> will cause a call to unexpected() which usually calls terminate().
51 Reference< XInterface >  SAL_CALL FirebirdDriver_CreateInstance(
52 const Reference< XMultiServiceFactory >& _rxFa

New Defects reported by Coverity Scan for LibreOffice

2015-05-30 Thread scan-admin

Hi,

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

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


** CID 1302698:  Code maintainability issues  (UNUSED_VALUE)
/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx: 1647 in 
GtkSalGraphics::updateSettings(AllSettings &)()



*** CID 1302698:  Code maintainability issues  (UNUSED_VALUE)
/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx: 1647 in 
GtkSalGraphics::updateSettings(AllSettings &)()
1641 case PANGO_STRETCH_ULTRA_CONDENSED:aInfo.m_eWidth = 
WIDTH_ULTRA_CONDENSED;break;
1642 case PANGO_STRETCH_EXTRA_CONDENSED:aInfo.m_eWidth = 
WIDTH_EXTRA_CONDENSED;break;
1643 case PANGO_STRETCH_CONDENSED:aInfo.m_eWidth = 
WIDTH_CONDENSED;break;
1644 case PANGO_STRETCH_SEMI_CONDENSED:aInfo.m_eWidth = 
WIDTH_SEMI_CONDENSED;break;
1645 case PANGO_STRETCH_NORMAL:aInfo.m_eWidth = 
WIDTH_NORMAL;break;
1646 case PANGO_STRETCH_SEMI_EXPANDED:aInfo.m_eWidth = 
WIDTH_SEMI_EXPANDED;break;
>>> CID 1302698:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value "WIDTH_EXPANDED" to "aInfo.m_eWidth" here, but that 
>>> stored value is overwritten before it can be used.
1647 case PANGO_STRETCH_EXPANDED:aInfo.m_eWidth = 
WIDTH_EXPANDED;break;
1648 case PANGO_STRETCH_EXTRA_EXPANDED:aInfo.m_eWidth = 
WIDTH_EXTRA_EXPANDED;break;
1649 case PANGO_STRETCH_ULTRA_EXPANDED:aInfo.m_eWidth = 
WIDTH_ULTRA_EXPANDED;break;
1650 }
1651 aInfo.m_eWidth = WIDTH_ULTRA_CONDENSED;
1652 

** CID 1302697:  Code maintainability issues  (UNUSED_VALUE)
/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx: 1645 in 
GtkSalGraphics::updateSettings(AllSettings &)()



*** CID 1302697:  Code maintainability issues  (UNUSED_VALUE)
/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx: 1645 in 
GtkSalGraphics::updateSettings(AllSettings &)()
1639 switch( eStretch )
1640 {
1641 case PANGO_STRETCH_ULTRA_CONDENSED:aInfo.m_eWidth = 
WIDTH_ULTRA_CONDENSED;break;
1642 case PANGO_STRETCH_EXTRA_CONDENSED:aInfo.m_eWidth = 
WIDTH_EXTRA_CONDENSED;break;
1643 case PANGO_STRETCH_CONDENSED:aInfo.m_eWidth = 
WIDTH_CONDENSED;break;
1644 case PANGO_STRETCH_SEMI_CONDENSED:aInfo.m_eWidth = 
WIDTH_SEMI_CONDENSED;break;
>>> CID 1302697:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value "WIDTH_NORMAL" to "aInfo.m_eWidth" here, but that 
>>> stored value is overwritten before it can be used.
1645 case PANGO_STRETCH_NORMAL:aInfo.m_eWidth = 
WIDTH_NORMAL;break;
1646 case PANGO_STRETCH_SEMI_EXPANDED:aInfo.m_eWidth = 
WIDTH_SEMI_EXPANDED;break;
1647 case PANGO_STRETCH_EXPANDED:aInfo.m_eWidth = 
WIDTH_EXPANDED;break;
1648 case PANGO_STRETCH_EXTRA_EXPANDED:aInfo.m_eWidth = 
WIDTH_EXTRA_EXPANDED;break;
1649 case PANGO_STRETCH_ULTRA_EXPANDED:aInfo.m_eWidth = 
WIDTH_ULTRA_EXPANDED;break;
1650 }

** CID 1302696:  Code maintainability issues  (UNUSED_VALUE)
/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx: 1642 in 
GtkSalGraphics::updateSettings(AllSettings &)()



*** CID 1302696:  Code maintainability issues  (UNUSED_VALUE)
/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx: 1642 in 
GtkSalGraphics::updateSettings(AllSettings &)()
1636 else
1637 aInfo.m_eWeight = WEIGHT_ULTRABOLD;
1638 // set width
1639 switch( eStretch )
1640 {
1641 case PANGO_STRETCH_ULTRA_CONDENSED:aInfo.m_eWidth = 
WIDTH_ULTRA_CONDENSED;break;
>>> CID 1302696:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value "WIDTH_EXTRA_CONDENSED" to "aInfo.m_eWidth" here, but 
>>> that stored value is overwritten before it can be used.
1642 case PANGO_STRETCH_EXTRA_CONDENSED:aInfo.m_eWidth = 
WIDTH_EXTRA_CONDENSED;break;
1643 case PANGO_STRETCH_CONDENSED:aInfo.m_eWidth = 
WIDTH_CONDENSED;break;
1644 case PANGO_STRETCH_SEMI_CONDENSED:aInfo.m_eWidth = 
WIDTH_SEMI_CONDENSED;break;
1645 case PANGO_STRETCH_NORMAL:aInfo.m_eWidth = 
WIDTH_NORMAL;break;
1646 case PANGO_STRETCH_SEMI_EXPANDED:aInfo.m_eWidth = 
WIDTH_SEMI_EXPANDED;break;
1647 case PANGO_STRETCH_EXPANDED:aInfo.m_

New Defects reported by Coverity Scan for LibreOffice

2015-06-04 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.
84 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 1304135:  Control flow issues  (MISSING_BREAK)
/svx/source/sidebar/text/TextPropertyPanel.cxx: 162 in 
svx::sidebar::TextPropertyPanel::HandleContextChange(const 
sfx2::sidebar::EnumContext &)()



*** CID 1304135:  Control flow issues  (MISSING_BREAK)
/svx/source/sidebar/text/TextPropertyPanel.cxx: 162 in 
svx::sidebar::TextPropertyPanel::HandleContextChange(const 
sfx2::sidebar::EnumContext &)()
156 break;
157 
158 case CombinedEnumContext(Application_Calc, Context_EditCell):
159 case CombinedEnumContext(Application_Calc, Context_DrawText):
160 bNeedTextSpacing = true;
161 
>>> CID 1304135:  Control flow issues  (MISSING_BREAK)
>>> The above case falls through to this one.
162 case CombinedEnumContext(Application_WriterVariants, 
Context_DrawText):
163 case CombinedEnumContext(Application_WriterVariants, 
Context_Annotation):
164 case CombinedEnumContext(Application_DrawImpress, 
Context_DrawText):
165 case CombinedEnumContext(Application_DrawImpress, Context_Text):
166 case CombinedEnumContext(Application_DrawImpress, 
Context_Table):
167 case CombinedEnumContext(Application_DrawImpress, 
Context_OutlineText):



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2015-01-30 Thread scan-admin

Hi,

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

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


** CID 440978:  Dereference before null check  (REVERSE_INULL)
/sfx2/source/doc/objstor.cxx: 1204 in SfxObjectShell::SaveTo_Impl(SfxMedium &, 
const SfxItemSet *)()

** CID 704645:  Dereference after null check  (FORWARD_NULL)
/forms/source/solar/component/navbarcontrol.cxx: 164 in 
frm::ONavigationBarControl::createPeer(const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &)()

** CID 707772:  Uninitialized scalar field  (UNINIT_CTOR)
/extensions/source/update/check/updatecheck.cxx: 749 in 
UpdateCheck::UpdateCheck()()

** CID 1197492:  Uninitialized scalar variable  (UNINIT)
/usr/include/c++/4.9.2/bits/random.tcc: 1782 in 
std::binomial_distribution::operator 
()>(T1 &, const 
std::binomial_distribution::param_type &)()

** CID 1267628:  Resource leak in object  (CTOR_DTOR_LEAK)
/connectivity/source/drivers/evoab2/NResultSet.cxx: 626 in 
connectivity::evoab::OEvoabResultSet::OEvoabResultSet(connectivity::evoab::OCommonStatement
 *, connectivity::evoab::OEvoabConnection *)()

** CID 1267629:  Logically dead code  (DEADCODE)
/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx: 2082 in 
writerfilter::ooxml::OOXMLFastContextHandlerMath::process()()

** CID 1267630:  Logically dead code  (DEADCODE)
/vcl/source/window/builder.cxx: 2035 in VclBuilder::handleChild(vcl::Window *, 
xmlreader::XmlReader &)()

** CID 1267631:  Logically dead code  (DEADCODE)
/sw/source/filter/ww8/wrtw8esh.cxx: 3123 in 
SwMSConvertControls::ExportControl(WW8Export &, const SdrObject *)()

** CID 1267632:  Logically dead code  (DEADCODE)
/sw/source/filter/html/htmlforw.cxx: 681 in GetControlSize(const SdrObject &, 
Size &, SwDoc *)()

** CID 1267633:  Logically dead code  (DEADCODE)
/sw/source/core/table/swnewtable.cxx: 1332 in 
lcl_CalculateSplitLineHeights(std::set, 
std::allocator> &, std::set, std::allocator> 
&, const SwTable &, const SwSelBoxes &, unsigned short)()

** CID 1267634:  Logically dead code  (DEADCODE)
/sw/source/filter/html/htmlforw.cxx: 708 in OutHTML_DrawFrmFmtAsControl(Writer 
&, const SwDrawFrmFmt &, const SdrObject &, bool)()

** CID 1267635:  Logically dead code  (DEADCODE)
/sw/source/core/doc/docnum.cxx: 767 in lcl_ChgNumRule(SwDoc &, const SwNumRule 
&)()

** CID 1267636:  Logically dead code  (DEADCODE)
/sw/source/core/doc/textboxhelper.cxx: 242 in 
SwTextBoxHelper::getByIndex(SdrPage *, int, std::set, std::allocator> &)()

** CID 1267637:  Logically dead code  (DEADCODE)
/sw/source/core/undo/undobj.cxx: 233 in SwUndo::Repeat(SfxRepeatTarget &)()

** CID 1267638:  Logically dead code  (DEADCODE)
/sw/source/core/undo/undobj.cxx: 223 in SwUndo::RedoWithContext(SfxUndoContext 
&)()

** CID 1267639:  Logically dead code  (DEADCODE)
/sw/source/core/undo/undobj.cxx: 213 in SwUndo::UndoWithContext(SfxUndoContext 
&)()

** CID 1267640:  Logically dead code  (DEADCODE)
/sw/source/filter/html/htmlforw.cxx: 647 in SwHTMLWriter::GetHTMLControl(const 
SwDrawFrmFmt &)()

** CID 1267641:  Logically dead code  (DEADCODE)
/sw/source/core/layout/pagechg.cxx: 538 in SwPageFrm::_UpdateAttr(const 
SfxPoolItem *, const SfxPoolItem *, unsigned char &, SwAttrSetChg *, 
SwAttrSetChg *)()

** CID 1267642:  Logically dead code  (DEADCODE)
/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx: 120 in 
XFStyleManager::AddStyle(IXFStyle *)()

** CID 1267643:  Logically dead code  (DEADCODE)
/sfx2/source/dialog/tabdlg.cxx: 1108 in 
SfxTabDialog::ActivatePageHdl(TabControl *)()



*** CID 440978:  Dereference before null check  (REVERSE_INULL)
/sfx2/source/doc/objstor.cxx: 1204 in SfxObjectShell::SaveTo_Impl(SfxMedium &, 
const SfxItemSet *)()
1198 SFX_ITEMSET_ARG( pMedSet, pSaveToItem, SfxBoolItem, 
SID_SAVETO, false );
1199 bCopyTo =   GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
1200 (pSaveToItem && pSaveToItem->GetValue());
1201 }
1202 
1203 // use UCB for case sensitive/insensitive file name comparison
>>> CID 440978:  Dereference before null check  (REVERSE_INULL)
>>> Null-checking "this->pMedium" suggests that it may be null, but it has 
>>> already been dereferenced on all paths leading to the check.
1204 if ( pMedium
1205   && !pMedium->GetName().equalsIgnoreAsciiCase("private:stream")
1206   && !rMedium.GetName().equalsIgnoreAsciiCase("private:stream")
1207   && ::utl::UCBContentHelper::EqualURLs( pMedium->GetName(), 
rMedium.GetName() ) )
1208 {
1209 bStoreToSameLocation = true;

__

New Defects reported by Coverity Scan for LibreOffice

2015-02-03 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.
51 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 1268022:  Logically dead code  (DEADCODE)
/vcl/workben/vcldemo.cxx: 413 in DemoRenderer::DrawText::drawText(OutputDevice 
&, Rectangle, bool, bool, bool)()

** CID 1268023:  Logically dead code  (DEADCODE)
/vcl/source/opengl/OpenGLHelper.cxx: 120 in addPreamble(rtl::OString &, const 
rtl::OString &)()

** CID 1268024:  Uncaught exception  (UNCAUGHT_EXCEPT)
/basctl/source/dlged/dlgedlist.cxx: 42 in 
basctl::DlgEdPropListenerImpl::propertyChange(const 
com::sun::star::beans::PropertyChangeEvent &)()

** CID 1268025:  Uninitialized scalar field  (UNINIT_CTOR)
/vcl/inc/sallayout.hxx: 304 in GlyphItem::GlyphItem(int, unsigned int, const 
Point &, long, int)()



*** CID 1268022:  Logically dead code  (DEADCODE)
/vcl/workben/vcldemo.cxx: 413 in DemoRenderer::DrawText::drawText(OutputDevice 
&, Rectangle, bool, bool, bool)()
407 nFontIndex=0;
408 nFontColorIndex=0;
409 }
410 else
411 {
412 // random font size to avoid buffering
>>> CID 1268022:  Logically dead code  (DEADCODE)
>>> Execution cannot reach this statement: "nFontHeight = 1. + i * (0.9...".
413 nFontHeight = 1 + i * (0.9 + 
comphelper::rng::uniform_real_distribution(0.0, std::nextafter(0.1, DBL_MAX))) 
* (r.Top() - r.Bottom()) / nPrintNumCopies;
414 nFontIndex = (i % maFontNames.size());
415 nFontColorIndex=(i % maFontNames.size());
416 }
417 
418 rDev.SetTextColor(Color(nCols[nFontColorIndex]));


*** CID 1268023:  Logically dead code  (DEADCODE)
/vcl/source/opengl/OpenGLHelper.cxx: 120 in addPreamble(rtl::OString &, const 
rtl::OString &)()
114 int nVersionStrEndPos = rShaderSource.indexOf('\n', 
nVersionStrStartPos);
115 
116 // no way this should happen - if this is the case, then it's a 
syntax error
117 assert(nVersionStrEndPos != -1);
118 
119 if (nVersionStrEndPos == -1)
>>> CID 1268023:  Logically dead code  (DEADCODE)
>>> Execution cannot reach this statement: "nVersionStrEndPos = nVersio...".
120 nVersionStrEndPos = nVersionStrStartPos + 8;
121 
122 OString aVersionLine = rShaderSource.copy(0, nVersionStrEndPos 
- nVersionStrStartPos);
123 OString aShaderBody = rShaderSource.copy(nVersionStrEndPos - 
nVersionStrStartPos);
124 
125 rShaderSource = aVersionLine + "\n" + rPreamble + "\n" + 
aShaderBody;


*** CID 1268024:  Uncaught exception  (UNCAUGHT_EXCEPT)
/basctl/source/dlged/dlgedlist.cxx: 42 in 
basctl::DlgEdPropListenerImpl::propertyChange(const 
com::sun::star::beans::PropertyChangeEvent &)()
36 // XEventListener
37 void SAL_CALL DlgEdPropListenerImpl::disposing( const 
::com::sun::star::lang::EventObject& ) throw( 
::com::sun::star::uno::RuntimeException, std::exception)
38 {
39 }
40 
41 // XPropertyChangeListener
>>> CID 1268024:  Uncaught exception  (UNCAUGHT_EXCEPT)
>>> An exception of type 
>>> "com::sun::star::container::NoSuchElementException" is thrown but the throw 
>>> list "throw(com::sun::star::uno::RuntimeException, std::exception)" doesn't 
>>> allow it to be thrown. This will cause a call to unexpected() which usually 
>>> calls terminate().
42 void SAL_CALL DlgEdPropListenerImpl::propertyChange( const  
::com::sun::star::beans::PropertyChangeEvent& evt ) throw( 
::com::sun::star::uno::RuntimeException, std::exception)
43 {
44 rDlgEdObj._propertyChange( evt );
45 }
46 
47 // DlgEdEvtContListenerImpl


*** CID 1268025:  Uninitialized scalar field  (UNINIT_CTOR)
/vcl/inc/sallayout.hxx: 304 in GlyphItem::GlyphItem(int, unsigned int, const 
Point &, long, int)()
298 GlyphItem( int nCharPos, sal_GlyphId aGlyphId, const Point& 
rLinearPos,
299 long nFlags, int nOrigWidth )
300 :   mnFlags(nFlags), mnCharPos(nCharPos),
301 mnOrigWidth(nOrigWidth), mnNewWidth(nOrigWidth),
302 mnXOffset(0),
303 maGlyphId(aGlyphId), maLin

New Defects reported by Coverity Scan for LibreOffice

2015-02-07 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.
24 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 1268298:  Logically dead code  (DEADCODE)
/sal/rtl/ustring.cxx: 577 in rtl_uString_newFromCodePoints()

** CID 1268299:  Logically dead code  (DEADCODE)
/sc/source/core/tool/grouparealistener.cxx: 193 in 
sc::FormulaGroupAreaListener::collectFormulaCells(int, int, 
std::vector> &) const()

** CID 1268300:  Logically dead code  (DEADCODE)
/sc/source/core/tool/grouparealistener.cxx: 285 in 
sc::FormulaGroupAreaListener::getTopCell() const()

** CID 1268301:  Dereference null return value  (NULL_RETURNS)
/oox/source/export/shapes.cxx: 364 in 
oox::drawingml::ShapeExport::WriteCustomShape(com::sun::star::uno::Reference)()

** CID 1268297:  Logically dead code  (DEADCODE)
/sal/rtl/ustring.cxx: 953 in rtl_uString_internConvert()



*** CID 1268298:  Logically dead code  (DEADCODE)
/sal/rtl/ustring.cxx: 577 in rtl_uString_newFromCodePoints()
571 }
572 /* Builds on the assumption that sal_Int32 uses 32 bit two's 
complement
573representation with wrap around (the necessary number of UTF-16 
code
574units will be no larger than 2 * SAL_MAX_INT32, represented as
575sal_Int32 -2): */
576 if (n < 0) {
>>> CID 1268298:  Logically dead code  (DEADCODE)
>>> Execution cannot reach this statement: "*newString = NULL;".
577 *newString = NULL;
578 return;
579 }
580 *newString = rtl_uString_ImplAlloc(n);
581 if (*newString == NULL) {
582 return;


*** CID 1268299:  Logically dead code  (DEADCODE)
/sc/source/core/tool/grouparealistener.cxx: 193 in 
sc::FormulaGroupAreaListener::collectFormulaCells(int, int, 
std::vector> &) const()
187 " range " << maRange.Format(SCA_VALID) <<
188 " mnTopCellRow " << mnTopCellRow << " length " << 
mnGroupLen);
189 
190 ScFormulaCell* const * pp = mpColumn->GetFormulaCellBlockAddress( 
mnTopCellRow);
191 assert(pp);
192 if (!pp)
>>> CID 1268299:  Logically dead code  (DEADCODE)
>>> Execution cannot reach this statement: "return;".
193 return;
194 
195 ScFormulaCell* const * ppEnd = pp + mnGroupLen;
196 
197 if (mbStartFixed)
198 {


*** CID 1268300:  Logically dead code  (DEADCODE)
/sc/source/core/tool/grouparealistener.cxx: 285 in 
sc::FormulaGroupAreaListener::getTopCell() const()
279 }
280 
281 const ScFormulaCell* FormulaGroupAreaListener::getTopCell() const
282 {
283 const ScFormulaCell* const * pp = 
mpColumn->GetFormulaCellBlockAddress( mnTopCellRow);
284 assert(pp);
>>> CID 1268300:  Logically dead code  (DEADCODE)
>>> Execution cannot reach the expression "NULL" inside this statement: 
>>> "return pp ? *pp : NULL;".
285 return pp ? *pp : NULL;
286 }
287 
288 const ScRange& FormulaGroupAreaListener::getRange() const
289 {
290 return maRange;


*** CID 1268301:  Dereference null return value  (NULL_RETURNS)
/oox/source/export/shapes.cxx: 364 in 
oox::drawingml::ShapeExport::WriteCustomShape(com::sun::star::uno::Reference)()
358 Reference< XPropertySet > rXPropSet( xShape, UNO_QUERY );
359 bool bPredefinedHandlesUsed = true;
360 bool bHasHandles = false;
361 OUString sShapeType;
362 sal_uInt32 nMirrorFlags = 0;
363 MSO_SPT eShapeType = EscherPropertyContainer::GetCustomShapeType( 
xShape, nMirrorFlags, sShapeType );
>>> CID 1268301:  Dereference null return value  (NULL_RETURNS)
>>> Assigning: "pShape" = null return value from "GetSdrObjectFromXShape".
364 SdrObjCustomShape* pShape = static_cast( 
GetSdrObjectFromXShape( xShape ) );
365 bool bIsDefaultObject = EscherPropertyContainer::IsDefaultObject( 
pShape, eShapeType );
366 const char* sPresetShape = msfilter::util::GetOOXMLPresetGeometry( 
USS( sShapeType ) );
367 DBG(fprintf(stderr, "custom shape type: %s ==> %s\n", USS( 
sShapeType ), sPresetShape));
368 Sequence< PropertyValue > aGeometrySeq;
369 sal_Int32 nAdjustmentValuesIndex = -1;


*** CID 1268297: 

New Defects reported by Coverity Scan for LibreOffice

2015-02-12 Thread scan-admin

Hi,

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

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


** CID 1269592:(UNCAUGHT_EXCEPT)
/include/canvas/base/graphicdevicebase.hxx: 297 in 
canvas::GraphicDeviceBase>, 
vclcanvas::SpriteDeviceHelper, vclcanvas::tools::LocalGuard, 
cppu::OWeakObject>::setPropertyValue(const rtl::OUString &, const 
com::sun::star::uno::Any &)()
/include/canvas/base/graphicdevicebase.hxx: 297 in 
canvas::GraphicDeviceBase>, 
vclcanvas::DeviceHelper, vclcanvas::tools::LocalGuard, 
cppu::OWeakObject>::setPropertyValue(const rtl::OUString &, const 
com::sun::star::uno::Any &)()
/include/canvas/base/graphicdevicebase.hxx: 297 in 
canvas::GraphicDeviceBase>, 
oglcanvas::SpriteDeviceHelper, osl::Guard, 
cppu::OWeakObject>::setPropertyValue(const rtl::OUString &, const 
com::sun::star::uno::Any &)()
/include/canvas/base/graphicdevicebase.hxx: 297 in 
canvas::GraphicDeviceBase>, 
cairocanvas::SpriteDeviceHelper, osl::Guard, 
cppu::OWeakObject>::setPropertyValue(const rtl::OUString &, const 
com::sun::star::uno::Any &)()
/include/canvas/base/graphicdevicebase.hxx: 297 in 
canvas::GraphicDeviceBase>, 
cairocanvas::DeviceHelper, osl::Guard, 
cppu::OWeakObject>::setPropertyValue(const rtl::OUString &, const 
com::sun::star::uno::Any &)()



*** CID 1269592:(UNCAUGHT_EXCEPT)
/include/canvas/base/graphicdevicebase.hxx: 297 in 
canvas::GraphicDeviceBase>, 
vclcanvas::SpriteDeviceHelper, vclcanvas::tools::LocalGuard, 
cppu::OWeakObject>::setPropertyValue(const rtl::OUString &, const 
com::sun::star::uno::Any &)()
291 virtual css::uno::Reference< css::beans::XPropertySetInfo > 
SAL_CALL getPropertySetInfo() throw (css::uno::RuntimeException) SAL_OVERRIDE
292 {
293 MutexType aGuard( BaseType::m_aMutex );
294 return maPropHelper.getPropertySetInfo();
295 }
296 
>>> CID 1269592:(UNCAUGHT_EXCEPT)
>>> An exception of type 
>>> "boost::exception_detail::clone_impl
>>>  >" is thrown but the throw list 
>>> "throw(com::sun::star::uno::RuntimeException, 
>>> com::sun::star::lang::WrappedTargetException, 
>>> com::sun::star::lang::IllegalArgumentException, 
>>> com::sun::star::beans::PropertyVetoException, 
>>> com::sun::star::beans::UnknownPropertyException)" doesn't allow it to be 
>>> thrown. This will cause a call to unexpected() which usually calls 
>>> terminate().
297 virtual void SAL_CALL setPropertyValue( const OUString& 
  aPropertyName,
298 const css::uno::Any& 
aValue ) throw (css::beans::UnknownPropertyException,
299 
  css::beans::PropertyVetoException,
300 
  css::lang::IllegalArgumentException,
301 
  css::lang::WrappedTargetException,
302 
  css::uno::RuntimeException) SAL_OVERRIDE
/include/canvas/base/graphicdevicebase.hxx: 297 in 
canvas::GraphicDeviceBase>, 
vclcanvas::DeviceHelper, vclcanvas::tools::LocalGuard, 
cppu::OWeakObject>::setPropertyValue(const rtl::OUString &, const 
com::sun::star::uno::Any &)()
291 virtual css::uno::Reference< css::beans::XPropertySetInfo > 
SAL_CALL getPropertySetInfo() throw (css::uno::RuntimeException) SAL_OVERRIDE
292 {
293 MutexType aGuard( BaseType::m_aMutex );
294 return maPropHelper.getPropertySetInfo();
295 }
296 
>>> CID 1269592:(UNCAUGHT_EXCEPT)
>>> An exception of type 
>>> "boost::exception_detail::clone_impl
>>>  >" is thrown but the throw list 
>>> "throw(com::sun::star::uno::RuntimeException, 
>>> com::sun::star::lang::WrappedTargetException, 
>>> com::sun::star::lang::IllegalArgumentException, 
>>> com::sun::star::beans::PropertyVetoException, 
>>> com::sun::star::beans::UnknownPropertyException)" doesn't allow it to be 
>>> thrown. This will cause a call to unexpected() which usually calls 
>>> terminate().
297 virtual void SAL_CALL setPropertyValue( const OUString& 
  aPropertyName,
298 const css::uno::Any& 
aValue ) throw (css::beans::UnknownPropertyException,
299 
  

New Defects reported by Coverity Scan for LibreOffice

2015-02-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.
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 3 of 3 defect(s)


** CID 1270937:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/core/macros-test.cxx: 407 in SwMacrosTest::testFindReplace()()



*** CID 1270937:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/core/macros-test.cxx: 407 in SwMacrosTest::testFindReplace()()
401 
402 void SwMacrosTest::testFindReplace()
403 {
404 // we need a full document with view and layout etc. because 
::GetNode()
405 Reference const xComponent =
406 loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
>>> CID 1270937:  Null pointer dereferences  (FORWARD_NULL)
>>> Assigning: "pTxtDoc" = "dynamic_cast >> *>(xComponent.get())".
407 SwXTextDocument *const pTxtDoc = dynamic_cast(xComponent.get());
408 SwDoc *const pDoc = pTxtDoc->GetDocShell()->GetDoc();
409 SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1);
410 // use a UnoCrsr so it will be corrected when deleting nodes
411 SwUnoCrsr *const pPaM(pDoc->CreateUnoCrsr(SwPosition(aIdx), false));
412 



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2015-07-22 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.
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 6 of 6 defect(s)


** CID 1312089:  Uninitialized members  (UNINIT_CTOR)
/fpicker/source/office/RemoteFilesDialog.cxx: 218 in 
RemoteFilesDialog::RemoteFilesDialog(vcl::Window *, long)()



*** CID 1312089:  Uninitialized members  (UNINIT_CTOR)
/fpicker/source/office/RemoteFilesDialog.cxx: 218 in 
RemoteFilesDialog::RemoteFilesDialog(vcl::Window *, long)()
212 
213 FillServicesListbox();
214 
215 m_pServices_lb->SetSelectHdl( LINK( this, RemoteFilesDialog, 
SelectServiceHdl ) );
216 
217 m_pFilter_lb->SetSelectHdl( LINK( this, RemoteFilesDialog, 
SelectFilterHdl ) );
>>> CID 1312089:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_pFileNotifier" is not initialized in this 
>>> constructor nor in any functions that it calls.
218 }
219 
220 RemoteFilesDialog::~RemoteFilesDialog()
221 {
222 disposeOnce();
223 }

** CID 1312088:  Uninitialized members  (UNINIT_CTOR)
/fpicker/source/office/RemoteFilesDialog.cxx: 29 in 
FileViewContainer::FileViewContainer(vcl::Window *)()



*** CID 1312088:  Uninitialized members  (UNINIT_CTOR)
/fpicker/source/office/RemoteFilesDialog.cxx: 29 in 
FileViewContainer::FileViewContainer(vcl::Window *)()
23 FileViewContainer( vcl::Window *pParent )
24 : Window( pParent, WB_TABSTOP )
25 , m_pFileView( NULL )
26 , m_pTreeView( NULL )
27 , m_pSplitter( NULL )
28 {
>>> CID 1312088:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_nCurrentFocus" is not initialized in this 
>>> constructor nor in any functions that it calls.
29 }
30 
31 virtual ~FileViewContainer()
32 {
33 disposeOnce();
34 }

** CID 1312087:(RESOURCE_LEAK)
/svtools/source/contnr/foldertree.cxx: 65 in 
FolderTree::FillTreeEntry(SvTreeListEntry *)()
/svtools/source/contnr/foldertree.cxx: 65 in 
FolderTree::FillTreeEntry(SvTreeListEntry *)()



*** CID 1312087:(RESOURCE_LEAK)
/svtools/source/contnr/foldertree.cxx: 65 in 
FolderTree::FillTreeEntry(SvTreeListEntry *)()
59 OUString* sData = new OUString( 
aContent[i]->maTargetURL );
60 pNewEntry->SetUserData( static_cast< void* >( 
sData ) );
61 }
62 }
63 }
64 }
>>> CID 1312087:(RESOURCE_LEAK)
>>> Variable "pContentEnumerator" going out of scope leaks the storage it 
>>> points to.
65 }
66 }
67 
68 void FolderTree::SetTreePath( OUString const & sUrl )
69 {
70 INetURLObject aUrl( sUrl );
/svtools/source/contnr/foldertree.cxx: 65 in 
FolderTree::FillTreeEntry(SvTreeListEntry *)()
59 OUString* sData = new OUString( 
aContent[i]->maTargetURL );
60 pNewEntry->SetUserData( static_cast< void* >( 
sData ) );
61 }
62 }
63 }
64 }
>>> CID 1312087:(RESOURCE_LEAK)
>>> Variable "pContentEnumerator" going out of scope leaks the storage it 
>>> points to.
65 }
66 }
67 
68 void FolderTree::SetTreePath( OUString const & sUrl )
69 {
70 INetURLObject aUrl( sUrl );

** CID 1312086:  Memory - illegal accesses  (OVERRUN)
/fpicker/source/office/RemoteFilesDialog.cxx: 93 in 
FileViewContainer::changeFocus(bool)()



*** CID 1312086:  Memory - illegal accesses  (OVERRUN)
/fpicker/source/office/RemoteFilesDialog.cxx: 93 in 
FileViewContainer::changeFocus(bool)()
87 {
88 if( !m_pFileView || !m_pTreeView )
89 return;
90 
91 if( !bReverse && m_nCurrentFocus < 4 )
92 {
>>> CID 1312086:  Memory - illegal accesses  (OVERRUN)
>>> Overrunning array "this->m_pFocusWidgets" of 4 8-byte elements at 
>>> element index 4 (byte offset 32) using index "++this->m_nCurrentFocus" 
>>> (which evaluates to 4).
93 m_pFocusWidgets[++m_nCurrentFocus]->SetFakeFocus( true );
94 m_pFocusWidgets[m_nCurrentFocus]->GrabFocus();
95 }
96 else if( m_nCurrentFocus > 0 )
97 {
98  

New Defects reported by Coverity Scan for LibreOffice

2015-07-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.
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 1312139:  Insecure data handling  (TAINTED_SCALAR)
/comphelper/source/xml/xmltools.cxx: 84 in comphelper::xml::makeXMLChaff()()



*** CID 1312139:  Insecure data handling  (TAINTED_SCALAR)
/comphelper/source/xml/xmltools.cxx: 84 in comphelper::xml::makeXMLChaff()()
78 rtlRandomPool pool = rtl_random_createPool();
79 
80 sal_Int8 n;
81 rtl_random_getBytes(pool, &n, 1);
82 
83 //1024 minus max -127/plus max 128
>>> CID 1312139:  Insecure data handling  (TAINTED_SCALAR)
>>> Assigning: "nLength" = "1024 + n". Both are now tainted.
84 sal_Int32 nLength = 1024+n;
85 std::vector aChaff(nLength);
86 rtl_random_getBytes(pool, &aChaff[0], nLength);
87 
88 rtl_random_destroyPool(pool);
89 

** CID 1312138:  Resource leaks  (RESOURCE_LEAK)
/sal/osl/unx/random.cxx: 30 in osl_get_system_random_data()



*** CID 1312138:  Resource leaks  (RESOURCE_LEAK)
/sal/osl/unx/random.cxx: 30 in osl_get_system_random_data()
24 while(desired_len)
25 {
26 if ((nb_read = read(fd, buffer, desired_len)) == -1)
27 {
28 if (errno != EINTR)
29 {
>>> CID 1312138:  Resource leaks  (RESOURCE_LEAK)
>>> Handle variable "fd" going out of scope leaks the handle.
30 return false;
31 }
32 }
33 else
34 {
35 buffer  += nb_read;



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2015-08-03 Thread scan-admin

Hi,

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

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


** CID 1315077:  Uninitialized members  (UNINIT_CTOR)
/usr/include/c++/5.1.1/functional: 2246 in std::function> 
&)>::function(const std::function> 
&)>&)()



*** CID 1315077:  Uninitialized members  (UNINIT_CTOR)
/usr/include/c++/5.1.1/functional: 2246 in std::function> 
&)>::function(const std::function> 
&)>&)()
2240   if (static_cast(__x))
2241{
2242  __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
2243  _M_invoker = __x._M_invoker;
2244  _M_manager = __x._M_manager;
2245}
>>> CID 1315077:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "_M_invoker" is not initialized in this 
>>> constructor nor in any functions that it calls.
2246 }
2247 
2248   template
2249 template
2250   function<_Res(_ArgTypes...)>::
2251   function(_Functor __f)

** CID 1315076:  Uninitialized members  (UNINIT_CTOR)
/usr/include/c++/5.1.1/functional: 2007 in std::function> 
&)>::function()()



*** CID 1315076:  Uninitialized members  (UNINIT_CTOR)
/usr/include/c++/5.1.1/functional: 2007 in std::function> 
&)>::function()()
2001 
2002   /**
2003*  @brief Default construct creates an empty function call 
wrapper.
2004*  @post @c !(bool)*this
2005*/
2006   function() noexcept
>>> CID 1315076:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "_M_invoker" is not initialized in this 
>>> constructor nor in any functions that it calls.
2007   : _Function_base() { }
2008 
2009   /**
2010*  @brief Creates an empty function call wrapper.
2011*  @post @c !(bool)*this
2012*/

** CID 1315075:  Uninitialized members  (UNINIT_CTOR)
/libreofficekit/source/gtk/tilebuffer.hxx: 209 in LOEvent::LOEvent(int)()



*** CID 1315075:  Uninitialized members  (UNINIT_CTOR)
/libreofficekit/source/gtk/tilebuffer.hxx: 209 in LOEvent::LOEvent(int)()
203 int m_nSetGraphicSelectionX;
204 int m_nSetGraphicSelectionY;
205 ///@}
206 
207 /// Constructor to instantiate an object of type `type`.
208 LOEvent(int type)
>>> CID 1315075:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_nSetGraphicSelectionY" is not initialized in 
>>> this constructor nor in any functions that it calls.
209 : m_nType(type) {}
210 };
211 
212 #endif // INCLUDED_TILEBUFFER_HXX
213 

** CID 1315074:(PASS_BY_VALUE)
/usr/include/c++/5.1.1/functional: 2251 in std::function> 
&)>::function &, unsigned int, const 
std::vector> 
&), boost::_bi::list9, boost::arg<(int)2>, 
boost::arg<(int)3>, boost::arg<(int)4>, 
boost::_bi::value, 
boost::_bi::value, 
boost::_bi::value>, 
boost::_bi::value, boost::arg<(int)6
 >>>, void>(T1)()
/usr/include/c++/5.1.1/functional: 2251 in std::function> 
&)>::function> 
&), boost::_bi::list7, boost::arg<(int)2>, 
boost::arg<(int)3>, boost::arg<(int)4>, 
boost::_bi::value, 
boost::_bi::value, boost::arg<(int)6>>>, 
void>(T1)()
/usr/include/c++/5.1.1/functional: 2251 in std::function> 
&)>::function, boost::arg<(int)2>, boost::arg<(int)3>, 
boost::arg<(int)4>, boost::arg<(int)5>, 
boost::_bi::value>>, void>(T1)()



*** CID 1315074:(PASS_BY_VALUE)
/usr/include/c++/5.1.1/functional: 2251 in std::function> 
&)>::function &, unsigned int, const 
std::vector> 
&), boost::_bi::list9, boost::arg<(int)2>, 
boost::arg<(int)3>, boost::arg<(int)4>, 
boost::_bi::value, 
boost::_bi::value, 
boost::_bi::value>, 
boost::_bi::value, boost::arg<(int)6
 >>>, void>(T1)()
2245}
2246 }
2247 
2248   template
2249 template
2250   function<_Res(_ArgTypes...)>::
>>> CID 1315074:(PASS_BY_VALUE)
>>> Passing parameter __f of type "boost::_bi::bind_t>> (*)(oglcanvas::CanvasHelper const &, basegfx::B2DHomMatrix const &, 
>>> unsigned int, unsigned int, com::sun::star::rendering::Texture const &, 
>>> com::sun::star::geometry::IntegerSize2D const &, 
>>> com::sun::star::uno::Sequence const &, unsigned int, 
>>> std::vector>> std::allocator > const &), 
>>> boost::_bi::list9, boost::arg<2>, bo

New Defects reported by Coverity Scan for LibreOffice

2015-08-05 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.
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 2 of 2 defect(s)


** CID 1315264:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
/oox/source/shape/WpsContext.cxx: 103 in 
oox::shape::WpsContext::onCreateContext(int, const oox::AttributeList &)()



*** CID 1315264:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
/oox/source/shape/WpsContext.cxx: 103 in 
oox::shape::WpsContext::onCreateContext(int, const oox::AttributeList &)()
97 double fRotate = 0;
98 double fShearX = 0;
99 aTransformation.decompose(aScale, aTranslate, 
fRotate, fShearX);
100 
101 // If the text is not rotated the way the shape 
wants it already, set the angle.
102 const sal_Int32 nRotation = -270;
>>> CID 1315264:  Incorrect expression  (UNINTENDED_INTEGER_DIVISION)
>>> Dividing integer expressions "NormAngle360(-27000L)" and "100L", and 
>>> then converting the integer quotient to type "double". Any remainder, or 
>>> fractional part of the quotient, is ignored.
103 if (basegfx::rad2deg(fRotate) != 
NormAngle360(nRotation * 100) / 100)
104 {
105 comphelper::SequenceAsHashMap 
aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
106 aCustomShapeGeometry["TextPreRotateAngle"] = 
uno::makeAny(nRotation);
107 
xPropertySet->setPropertyValue("CustomShapeGeometry", 
uno::makeAny(aCustomShapeGeometry.getAsConstPropertyValueList()));
108 }

** CID 1222315:  Performance inefficiencies  (PASS_BY_VALUE)
/usr/include/c++/5.1.1/functional: 2251 in std::function::function, 
boost::_bi::list5, boost::_bi::value, 
boost::_bi::value, boost::_bi::value, 
boost::_bi::value>>, void>(T1)()



*** CID 1222315:  Performance inefficiencies  (PASS_BY_VALUE)
/usr/include/c++/5.1.1/functional: 2251 in std::function::function, 
boost::_bi::list5, boost::_bi::value, 
boost::_bi::value, boost::_bi::value, 
boost::_bi::value>>, void>(T1)()
2245}
2246 }
2247 
2248   template
2249 template
2250   function<_Res(_ArgTypes...)>::
>>> CID 1222315:  Performance inefficiencies  (PASS_BY_VALUE)
>>> Passing parameter __f of type "boost::_bi::bind_t>> boost::_mfi::mf4>> Size const &, Gradient const &>, boost::_bi::list5, 
>>> boost::_bi::value, boost::_bi::value, 
>>> boost::_bi::value, boost::_bi::value > >" (size 168 bytes) 
>>> by value.
2251   function(_Functor __f)
2252   : _Function_base()
2253   {
2254typedef _Function_handler<_Signature_type, _Functor> 
_My_handler;
2255 
2256if (_My_handler::_M_not_empty_function(__f))



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2015-07-01 Thread scan-admin

Hi,

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

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


** CID 1309071:  Error handling issues  (UNCAUGHT_EXCEPT)
/dbaccess/source/core/api/StaticSet.cxx: 299 in 
dbaccess::OStaticSet::updateRow(const 
rtl::Reference> &, const 
rtl::Reference> &, const 
com::sun::star::uno::Reference &)()



*** CID 1309071:  Error handling issues  (UNCAUGHT_EXCEPT)
/dbaccess/source/core/api/StaticSet.cxx: 299 in 
dbaccess::OStaticSet::updateRow(const 
rtl::Reference> &, const 
rtl::Reference> &, const 
com::sun::star::uno::Reference &)()
293 m_aSetIter = m_aSet.end() - 1;
294 ((*m_aSetIter)->get())[0] = (_rInsertRow->get())[0] = 
getBookmark();
295 m_bEnd = false;
296 }
297 }
298 
>>> CID 1309071:  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().
299 void SAL_CALL OStaticSet::updateRow(const ORowSetRow& _rInsertRow 
,const ORowSetRow& _rOriginalRow,const connectivity::OSQLTable& _xTable  ) 
throw(SQLException, RuntimeException)
300 {
301 OCacheSet::updateRow( _rInsertRow,_rOriginalRow,_xTable);
302 }
303 
304 void SAL_CALL OStaticSet::deleteRow(const ORowSetRow& _rDeleteRow 
,const connectivity::OSQLTable& _xTable  ) throw(SQLException, RuntimeException)

** CID 1309070:  Error handling issues  (UNCAUGHT_EXCEPT)
/helpcompiler/source/HelpLinker_main.cxx: 26 in main()



*** CID 1309070:  Error handling issues  (UNCAUGHT_EXCEPT)
/helpcompiler/source/HelpLinker_main.cxx: 26 in main()
20 #include 
21 #include 
22 #include 
23 #include 
24 #include 
25 
>>> CID 1309070:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type 
>>> "std::length_error" is thrown and never caught.
26 SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
27 std::vector args;
28 for (int i = 1; i < argc; ++i)
29 args.push_back(std::string(argv[i]));
30 try
31 {

** CID 1309069:  Error handling issues  (UNCAUGHT_EXCEPT)
/filter/source/svg/test/svg2odf.cxx: 67 in main()



*** CID 1309069:  Error handling issues  (UNCAUGHT_EXCEPT)
/filter/source/svg/test/svg2odf.cxx: 67 in main()
61 {
62 maFile.close();
63 }
64 };
65 }
66 
>>> CID 1309069:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type 
>>> "std::length_error" is thrown and never caught.
67 SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
68 {
69 if( argc != 4 )
70 {
71 OSL_TRACE( "Invocation: svg2odf   . 
Exiting" );
72 return 1;

** CID 1309068:  Error handling issues  (UNCAUGHT_EXCEPT)
/ucb/source/ucp/ftp/ftpurl.cxx: 597 in ftp::FTPURL::direntry() const()



*** CID 1309068:  Error handling issues  (UNCAUGHT_EXCEPT)
/ucb/source/ucp/ftp/ftpurl.cxx: 597 in ftp::FTPURL::direntry() const()
591 
592 curl_slist_free_all(slist);
593 return aNetTitle;
594 }
595 
596 
>>> CID 1309068:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list 
>>> "throw(ftp::curl_exception, ftp::malformed_exception)" doesn't allow it to 
>>> be thrown. This will cause a call to unexpected() which usually calls 
>>> terminate().
597 FTPDirentry FTPURL::direntry() const
598 throw (curl_exception, malformed_exception)
599 {
600 OUString nettitle = net_title();
601 FTPDirentry aDirentry;
602 

** CID 1309067:  Error handling issues  (UNCAUGHT_EXCEPT)
/svx/source/accessibility/AccessibleShape.cxx: 1156 in 
accessibility::AccessibleShape::CreateAccessibleName()()



*** CID 1309067:  Error handling issues  (UNCAUGHT_EXCEPT)
/svx/source/accessibility/AccessibleShape.cxx: 1156 in 
accessibility::AccessibleShape::CreateAccessibleName()()
1150 throw (::com::sun::star::un

New Defects reported by Coverity Scan for LibreOffice

2015-07-04 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.
23 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 1309267:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaeventshelper.cxx: 852 in 
ScVbaEventsHelper::createWorksheet(const 
com::sun::star::uno::Sequence &, int) const()



*** CID 1309267:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaeventshelper.cxx: 852 in 
ScVbaEventsHelper::createWorksheet(const 
com::sun::star::uno::Sequence &, int) const()
846 ScCellRangesBase* pNewCellRanges = 
ScCellRangesBase::getImplementation( xNewSelection );
847 bool bChanged = !pOldCellRanges || !pNewCellRanges || 
lclSelectionChanged( pOldCellRanges->GetRangeList(), 
pNewCellRanges->GetRangeList() );
848 maOldSelection <<= xNewSelection;
849 return bChanged;
850 }
851 
>>> CID 1309267:  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::lang::IllegalArgumentException)" doesn't allow it to be 
>>> thrown. This will cause a call to unexpected() which usually calls 
>>> terminate().
852 uno::Any ScVbaEventsHelper::createWorksheet( const uno::Sequence< 
uno::Any >& rArgs, sal_Int32 nIndex ) const
853 throw (lang::IllegalArgumentException, uno::RuntimeException)
854 {
855 // extract sheet index, will throw, if parameter is invalid
856 SCTAB nTab = lclGetTabFromArgs( rArgs, nIndex );
857 return uno::Any( excel::getUnoSheetModuleObj( mxModel, nTab ) );

** CID 1309266:  Error handling issues  (UNCAUGHT_EXCEPT)
/svx/source/accessibility/AccessibleControlShape.cxx: 608 in 
accessibility::AccessibleControlShape::CreateAccessibleName()()



*** CID 1309266:  Error handling issues  (UNCAUGHT_EXCEPT)
/svx/source/accessibility/AccessibleControlShape.cxx: 608 in 
accessibility::AccessibleControlShape::CreateAccessibleName()()
602 }
603 }
604 Reference< XAccessibleRelationSet > xSet = pRelationSetHelper;
605 return xSet;
606 }
607 
>>> CID 1309266:  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().
608 OUString AccessibleControlShape::CreateAccessibleName() throw 
(RuntimeException)
609 {
610 ensureControlModelAccess();
611 
612 OUString sName;
613 if ( getAccessibleRole() != AccessibleRole::SHAPE

** CID 1309265:  Error handling issues  (UNCAUGHT_EXCEPT)
/ucb/source/core/ucbcmds.cxx: 1684 in 
UniversalContentBroker::globalTransfer(const 
com::sun::star::ucb::GlobalTransferCommandArgument2 &, const 
com::sun::star::uno::Reference &)()



*** CID 1309265:  Error handling issues  (UNCAUGHT_EXCEPT)
/ucb/source/core/ucbcmds.cxx: 1684 in 
UniversalContentBroker::globalTransfer(const 
com::sun::star::ucb::GlobalTransferCommandArgument2 &, const 
com::sun::star::uno::Reference &)()
1678 UniversalContentBroker::getCommandInfo()
1679 {
1680 return uno::Reference< ucb::XCommandInfo >( new 
CommandProcessorInfo() );
1681 }
1682 
1683 
>>> CID 1309265:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::length_error" is thrown but the throw list 
>>> "throw(com::sun::star::uno::Exception)" doesn't allow it to be thrown. This 
>>> will cause a call to unexpected() which usually calls terminate().
1684 void UniversalContentBroker::globalTransfer(
1685 const ucb::GlobalTransferCommandArgument2 & rArg,
1686 const uno::Reference< ucb::XCommandEnvironment > & xEnv )
1687 throw( uno::Exception )
1688 {
1689 // Use own command environment with own interaction handler 
intercepting

** CID 1309264:  Integer handling issues  (REVERSE_NEGATIVE)
/oox/source/vml/vmlshape.cxx: 321 in 
oox::vml::ShapeBase::convertAndInsert(const 
com::sun::star::uno::Reference &, const 
oox::vml::ShapeParentAnchor *) const()



*** CID 1309264:  Integer handling issues  (REVERSE_NEGATIVE)
/oox/source/vml/vmlshape.cxx: 321 in 
oox::vml::

New Defects reported by Coverity Scan for LibreOffice

2015-07-08 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.
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 6 of 6 defect(s)


** CID 1311336:  Uninitialized members  (UNINIT_CTOR)
/cui/source/options/optaboutconfig.cxx: 68 in UserData::UserData(const 
rtl::OUString &)()



*** CID 1311336:  Uninitialized members  (UNINIT_CTOR)
/cui/source/options/optaboutconfig.cxx: 68 in UserData::UserData(const 
rtl::OUString &)()
62 int aLineage;
63 Reference aXNameAccess;
64 
65 explicit UserData( OUString const & rPropertyPath )
66 : bIsPropertyPath( true )
67 , sPropertyPath(rPropertyPath)
>>> CID 1311336:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "aLineage" is not initialized in this 
>>> constructor nor in any functions that it calls.
68 {}
69 
70 explicit UserData( Reference const & rXNameAccess, int 
rIndex = 0 )
71 : bIsPropertyPath( false )
72 , aLineage(rIndex)
73 , aXNameAccess( rXNameAccess )

** CID 1311335:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaapplication.cxx: 1066 in 
::lclCreateVbaRange(const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
std::list> &)()



*** CID 1311335:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaapplication.cxx: 1066 in 
::lclCreateVbaRange(const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, const 
std::list> &)()
1060 // again, join the result ranges
1061 lclJoinRanges( rList );
1062 }
1063 }
1064 
1065 /** Creates a VBA Range object from the passed list of ranges. */
>>> CID 1311335:  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().
1066 uno::Reference< excel::XRange > lclCreateVbaRange(
1067 const uno::Reference< uno::XComponentContext >& rxContext,
1068 const uno::Reference< frame::XModel >& rxModel,
1069 const ListOfScRange& rList ) throw (uno::RuntimeException)
1070 {
1071 ScDocShell* pDocShell = excel::getDocShell( rxModel );

** CID 1311334:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaeventshelper.cxx: 860 in 
ScVbaEventsHelper::createRange(const 
com::sun::star::uno::Sequence &, int) const()



*** CID 1311334:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbaeventshelper.cxx: 860 in 
ScVbaEventsHelper::createRange(const 
com::sun::star::uno::Sequence &, int) const()
854 {
855 // extract sheet index, will throw, if parameter is invalid
856 SCTAB nTab = lclGetTabFromArgs( rArgs, nIndex );
857 return uno::Any( excel::getUnoSheetModuleObj( mxModel, nTab ) );
858 }
859 
>>> CID 1311334:  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::lang::IllegalArgumentException)" doesn't allow it to be 
>>> thrown. This will cause a call to unexpected() which usually calls 
>>> terminate().
860 uno::Any ScVbaEventsHelper::createRange( const uno::Sequence< uno::Any 
>& rArgs, sal_Int32 nIndex ) const
861 throw (lang::IllegalArgumentException, uno::RuntimeException)
862 {
863 // it is possible to pass an existing VBA Range object
864 uno::Reference< excel::XRange > xVbaRange = getXSomethingFromArgs< 
excel::XRange >( rArgs, nIndex );
865 if( !xVbaRange.is() )

** CID 1311333:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbarange.cxx: 1238 in getRangeForName(const 
com::sun::star::uno::Reference &, const 
rtl::OUString &, ScDocShell *, com::sun::star::table::CellRangeAddress &, 
formula::FormulaGrammar::AddressConvention)()



*** CID 1311333:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbarange.cxx: 1238 in getRangeForName(const 
com::sun::star::uno::Reference &, const 
rtl::OUString &, ScDocShell *, com::sun::star::table::CellRangeAddress &, 
formula::FormulaGrammar::AddressConvention)()
1232   

New Defects reported by Coverity Scan for LibreOffice

2015-07-12 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.
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 8 of 8 defect(s)


** CID 1311655:  Uninitialized members  (UNINIT_CTOR)
/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx: 88 in 
svx::sidebar::ShadowPropertyPanel::ShadowPropertyPanel(vcl::Window *, const 
com::sun::star::uno::Reference &, SfxBindings 
*)()



*** CID 1311655:  Uninitialized members  (UNINIT_CTOR)
/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx: 88 in 
svx::sidebar::ShadowPropertyPanel::ShadowPropertyPanel(vcl::Window *, const 
com::sun::star::uno::Reference &, SfxBindings 
*)()
82 get(mpShadowTransSlider,"transparency_slider");
83 get(mpShadowTransMetric,"FIELD_TRANSPARENCY");
84 get(mpFTColor,"color");
85 get(mpLBShadowColor,"LB_SHADOW_COLOR");
86 
87 Initialize();
>>> CID 1311655:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "nXY" is not initialized in this constructor 
>>> nor in any functions that it calls.
88 }
89 
90 ShadowPropertyPanel::~ShadowPropertyPanel()
91 {
92 disposeOnce();
93 }

** CID 1311654:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/control/combobox.cxx: 66 in ComboBox::Impl::Impl(ComboBox&)()



*** CID 1311654:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/control/combobox.cxx: 66 in ComboBox::Impl::Impl(ComboBox&)()
60 boolm_isMatchCase : 1;
61 sal_Int32   m_nMaxWidthChars;
62 Link<>  m_SelectHdl;
63 Link<>  m_DoubleClickHdl;
64 boost::signals2::scoped_connection m_AutocompleteConnection;
65 
>>> CID 1311654:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_nMaxWidthChars" is not initialized in this 
>>> constructor nor in any functions that it calls.
66 Impl(ComboBox & rThis) : m_rThis(rThis) {}
67 
68 void ImplInitComboBoxData();
69 void ImplUpdateFloatSelection();
70 ComboBoxBounds calcComboBoxDropDownComponentBounds(
71 const Size &rOutSize, const Size &rBorderOutSize) const;

** CID 1311653:  Uninitialized members  (UNINIT_CTOR)
/include/vcl/printerinfomanager.hxx: 57 in psp::PrinterInfo::PrinterInfo()()



*** CID 1311653:  Uninitialized members  (UNINIT_CTOR)
/include/vcl/printerinfomanager.hxx: 57 in psp::PrinterInfo::PrinterInfo()()
51 // but assigned from the outside (currently for 
"fax","pdf=","autoqueue","external_dialog")
52 OUString m_aFeatures;
53 bool m_bPapersizeFromSetup;
54 
55 PrinterInfo() :
56 JobData()
>>> CID 1311653:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_bPapersizeFromSetup" is not initialized in 
>>> this constructor nor in any functions that it calls.
57 {}
58 };
59 
60 class VCL_DLLPUBLIC PrinterInfoManager
61 {
62 public:

** CID 1311652:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbarange.cxx: 2681 in ScVbaRange::Range(const 
com::sun::star::uno::Any &, const com::sun::star::uno::Any &, bool)()



*** CID 1311652:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbarange.cxx: 2681 in ScVbaRange::Range(const 
com::sun::star::uno::Any &, const com::sun::star::uno::Any &, bool)()
2675 uno::Reference< excel::XRange >
2676 ScVbaRange::Range( const uno::Any &Cell1, const uno::Any &Cell2 ) 
throw (uno::RuntimeException, std::exception)
2677 {
2678 return Range( Cell1, Cell2, false );
2679 }
2680 uno::Reference< excel::XRange >
>>> CID 1311652:  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().
2681 ScVbaRange::Range( const uno::Any &Cell1, const uno::Any &Cell2, bool 
bForceUseInpuRangeTab ) throw (uno::RuntimeException)
2682 
2683 {
2684 uno::Reference< table::XCellRange > xCellRange = mxRange;
2685 
2686 if ( m_Areas->getCount() > 1 )

** CID 1311651:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/ui/vba/vbarange.cxx: 1363 in ScVbaRange::getR

New Defects reported by Coverity Scan for LibreOffice

2015-03-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.
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 1272393:  Uninitialized members  (UNINIT_CTOR)
/usr/include/c++/4.9.2/cxxabi.h: 539 in 
__cxxabiv1::__vmi_class_type_info::__vmi_class_type_info(const char *, int)()



*** CID 1272393:  Uninitialized members  (UNINIT_CTOR)
/usr/include/c++/4.9.2/cxxabi.h: 539 in 
__cxxabiv1::__vmi_class_type_info::__vmi_class_type_info(const char *, int)()
533 // class is not constructable with a normal constructor. It is
534 // internally generated by the compiler.
535 __base_class_type_info  __base_info[1];  // Array of bases.
536 
537 explicit
538 __vmi_class_type_info(const char* __n, int ___flags)
>>> CID 1272393:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member field "__base_info.__offset_flags" is not 
>>> initialized in this constructor nor in any functions that it calls.
539 : __class_type_info(__n), __flags(___flags), __base_count(0) { }
540 
541 virtual
542 ~__vmi_class_type_info();
543 
544 // Implementation defined types.



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2015-03-09 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.
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 3 of 3 defect(s)


** CID 1287400:  Control flow issues  (MISSING_BREAK)
/sc/source/core/tool/compiler.cxx: 3850 in ScCompiler::CompileString(const 
rtl::OUString &)()



*** CID 1287400:  Control flow issues  (MISSING_BREAK)
/sc/source/core/tool/compiler.cxx: 3850 in ScCompiler::CompileString(const 
rtl::OUString &)()
3844 aCorrectedSymbol.clear();
3845 }
3846 }
3847 if (bUseFunctionStack && nFunction)
3848 --nFunction;
3849 }
>>> CID 1287400:  Control flow issues  (MISSING_BREAK)
>>> The above case falls through to this one.
3850 case ocTableRefOpen:
3851 {
3852 // Don't count following item separator as parameter 
separator.
3853 if (bUseFunctionStack)
3854 {
3855 ++nFunction;



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2015-03-19 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.
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 7 of 7 defect(s)


** CID 1288898:  Uninitialized members  (UNINIT_CTOR)
/vcl/unx/generic/printer/cupsmgr.cxx: 189 in psp::CUPSManager::CUPSManager()()



*** CID 1288898:  Uninitialized members  (UNINIT_CTOR)
/vcl/unx/generic/printer/cupsmgr.cxx: 189 in psp::CUPSManager::CUPSManager()()
183 m_nDests( 0 ),
184 m_pDests( NULL ),
185 m_bNewDests( false ),
186 m_bPPDThreadRunning( false )
187 {
188 m_aDestThread = osl_createThread( run_dest_thread_stub, this );
>>> CID 1288898:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "batchMode" is not initialized in this 
>>> constructor nor in any functions that it calls.
189 }
190 
191 CUPSManager::~CUPSManager()
192 {
193 if( m_aDestThread )
194 {



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2015-03-21 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.
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 2 of 2 defect(s)


** CID 1291169:  Possible Control flow issues  (DEADCODE)
/vcl/unx/generic/window/salframe.cxx: 3790 in 
X11SalFrame::HandleReparentEvent(XReparentEvent *)()



*** CID 1291169:  Possible Control flow issues  (DEADCODE)
/vcl/unx/generic/window/salframe.cxx: 3790 in 
X11SalFrame::HandleReparentEvent(XReparentEvent *)()
3784 if( hDummy == hWM_Parent )
3785 hDummy = hRoot;
3786 if( hDummy != hRoot )
3787 {
3788 hWM_Parent = hDummy;
3789 if( bAccessParentWindow && bNone )
>>> CID 1291169:  Possible Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "XSetWindowBackgroundPixmap(...".
3790 XSetWindowBackgroundPixmap( pDisplay, hWM_Parent, None 
);
3791 }
3792 if( Children )
3793 XFree( Children );
3794 } while( hDummy != hRoot );
3795 



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2015-03-29 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.
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 4 of 4 defect(s)


** CID 1292224:  Control flow issues  (DEADCODE)
/vcl/source/window/btndlg.cxx: 308 in 
ButtonDialog::AddButton(StandardButtonType, unsigned short, unsigned short, 
long)()



*** CID 1292224:  Control flow issues  (DEADCODE)
/vcl/source/window/btndlg.cxx: 308 in 
ButtonDialog::AddButton(StandardButtonType, unsigned short, unsigned short, 
long)()
302 nBtnFlags |= BUTTONDIALOG_HELPBUTTON;
303 else if ( (eType == StandardButtonType::Cancel) || (eType == 
StandardButtonType::Close) )
304 nBtnFlags |= BUTTONDIALOG_CANCELBUTTON;
305 pItem->mpPushButton = ImplCreatePushButton( nBtnFlags );
306 
307 // Standard-Buttons have the right text already
>>> CID 1292224:  Control flow issues  (DEADCODE)
>>> Execution cannot reach the expression "pItem->mpPushButton->GetType() 
>>> == 328" inside this statement: "if (!(eType == StandardButt...".
308 if ( !((eType == StandardButtonType::OK) && 
(pItem->mpPushButton->GetType() == WINDOW_OKBUTTON)) ||
309  !((eType == StandardButtonType::Cancel) && 
(pItem->mpPushButton->GetType() == WINDOW_CANCELBUTTON)) ||
310  !((eType == StandardButtonType::Help)   && 
(pItem->mpPushButton->GetType() == WINDOW_HELPBUTTON)) )
311 {
312 pItem->mpPushButton->SetText( Button::GetStandardText( eType ) 
);
313 }



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2015-04-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.
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 1292911:(PASS_BY_VALUE)
/usr/include/c++/4.9.2/functional: 2419 in std::function::function(T1)()
/usr/include/c++/4.9.2/functional: 2419 in std::function::function(T1)()
/usr/include/c++/4.9.2/functional: 2419 in std::function::function(T1)()
/usr/include/c++/4.9.2/functional: 2419 in std::function::function(T1)()
/usr/include/c++/4.9.2/functional: 2419 in std::function::function(T1)()



*** CID 1292911:(PASS_BY_VALUE)
/usr/include/c++/4.9.2/functional: 2419 in std::function::function(T1)()
2413}
2414 }
2415 
2416   template
2417 template
2418   function<_Res(_ArgTypes...)>::
>>> CID 1292911:(PASS_BY_VALUE)
>>> Passing parameter __f of type 
>>> "SwTableProperties_Impl::ApplyTblAttr(SwTable const &, SwDoc &)::[lambda() 
>>> (instance 4)]" (size 168 bytes) by value.
2419   function(_Functor __f)
2420   : _Function_base()
2421   {
2422typedef _Function_handler<_Signature_type, _Functor> 
_My_handler;
2423 
2424if (_My_handler::_M_not_empty_function(__f))
/usr/include/c++/4.9.2/functional: 2419 in std::function::function(T1)()
2413}
2414 }
2415 
2416   template
2417 template
2418   function<_Res(_ArgTypes...)>::
>>> CID 1292911:(PASS_BY_VALUE)
>>> Passing parameter __f of type 
>>> "SwTableProperties_Impl::ApplyTblAttr(SwTable const &, SwDoc &)::[lambda() 
>>> (instance 5)]" (size 168 bytes) by value.
2419   function(_Functor __f)
2420   : _Function_base()
2421   {
2422typedef _Function_handler<_Signature_type, _Functor> 
_My_handler;
2423 
2424if (_My_handler::_M_not_empty_function(__f))
/usr/include/c++/4.9.2/functional: 2419 in std::function::function(T1)()
2413}
2414 }
2415 
2416   template
2417 template
2418   function<_Res(_ArgTypes...)>::
>>> CID 1292911:(PASS_BY_VALUE)
>>> Passing parameter __f of type 
>>> "SwTableProperties_Impl::ApplyTblAttr(SwTable const &, SwDoc &)::[lambda() 
>>> (instance 2)]" (size 168 bytes) by value.
2419   function(_Functor __f)
2420   : _Function_base()
2421   {
2422typedef _Function_handler<_Signature_type, _Functor> 
_My_handler;
2423 
2424if (_My_handler::_M_not_empty_function(__f))
/usr/include/c++/4.9.2/functional: 2419 in std::function::function(T1)()
2413}
2414 }
2415 
2416   template
2417 template
2418   function<_Res(_ArgTypes...)>::
>>> CID 1292911:(PASS_BY_VALUE)
>>> Passing parameter __f of type 
>>> "SwTableProperties_Impl::ApplyTblAttr(SwTable const &, SwDoc &)::[lambda() 
>>> (instance 1)]" (size 168 bytes) by value.
2419   function(_Functor __f)
2420   : _Function_base()
2421   {
2422typedef _Function_handler<_Signature_type, _Functor> 
_My_handler;
2423 
2424if (_My_handler::_M_not_empty_function(__f))
/usr/include/c++/4.9.2/functional: 2419 in std::function::function(T1)()
2413}
2414 }
2415 
2416   template
2417 template
2418   function<_Res(_ArgTypes...)>::
>>> CID 1292911:(PASS_BY_VALUE)
>>> Passing parameter __f of type 
>>> "SwTableProperties_Impl::ApplyTblAttr(SwTable const &, SwDoc &)::[lambda() 
>>> (instance 3)]" (size 168 bytes) by value.
2419   function(_Functor __f)
2420   : _Function_base()
2421   {
2422typedef _Function_handler<_Signature_type, _Functor> 
_My_handler;
2423 
2424if (_My_handler::_M_not_empty_function(__f))

** CID 1292910:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/core/data/drwlayer.cxx: 147 in ScUndoAnchorData::Undo()()



*** CID 1292910:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/core/data/drwlayer.cxx: 147 in ScUndoAnchorData::Undo()()
141 {
142 }
143 
144 void ScUndoAnchorData::Undo()
145 {
146 // Trigger Object Change
>>> CID 1292910:  Null pointer dereferences  (FORWARD_NULL)
>>> Comparing "this->pObj" to null implies that "this->pObj" might be null.
147 if(pObj && pObj->IsInserted() && pObj->GetPage() && 
pObj->GetModel())
148 {
149 SdrHint aHint(*pObj);
150 pObj->GetModel()->Broadcast(aHint);
151 }
152 


___

New Defects reported by Coverity Scan for LibreOffice

2015-05-09 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.
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 6 of 6 defect(s)


** CID 1297236:  Uninitialized members  (UNINIT_CTOR)
/framework/source/helper/statusindicator.cxx: 28 in 
framework::StatusIndicator::StatusIndicator(framework::StatusIndicatorFactory 
*)()



*** CID 1297236:  Uninitialized members  (UNINIT_CTOR)
/framework/source/helper/statusindicator.cxx: 28 in 
framework::StatusIndicator::StatusIndicator(framework::StatusIndicatorFactory 
*)()
22 
23 namespace framework{
24 
25 StatusIndicator::StatusIndicator(StatusIndicatorFactory* pFactory)
26 : m_xFactory (pFactory)
27 {
>>> CID 1297236:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_nRange" is not initialized in this 
>>> constructor nor in any functions that it calls.
28 }
29 
30 StatusIndicator::~StatusIndicator()
31 {
32 }
33 

** CID 1297235:  Error handling issues  (UNCAUGHT_EXCEPT)
/sal/cppunittester/cppunittester.cxx: 297 in main()



*** CID 1297235:  Error handling issues  (UNCAUGHT_EXCEPT)
/sal/cppunittester/cppunittester.cxx: 297 in main()
291 return run();
292 }
293 };
294 
295 }
296 
>>> CID 1297235:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> In function "main(int, char **)" an exception of type 
>>> "boost::exception_detail::clone_impl
>>>  >" is thrown and never caught.
297 SAL_IMPLEMENT_MAIN() {
298 #ifdef WNT
299 //Disable Dr-Watson in order to crash simply without popup dialogs 
under
300 //windows
301 DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX);
302 SetErrorMode(SEM_NOGPFAULTERRORBOX|dwMode);

** CID 1297234:  Error handling issues  (UNCAUGHT_EXCEPT)
/reportdesign/source/ui/dlg/GroupsSorting.cxx: 1236 in 
rptui::OGroupsSortingDialog::_propertyChanged(const 
com::sun::star::beans::PropertyChangeEvent &)()



*** CID 1297234:  Error handling issues  (UNCAUGHT_EXCEPT)
/reportdesign/source/ui/dlg/GroupsSorting.cxx: 1236 in 
rptui::OGroupsSortingDialog::_propertyChanged(const 
com::sun::star::beans::PropertyChangeEvent &)()
1230 
1231 void OGroupsSortingDialog::showHelpText(sal_uInt16 _nResId)
1232 {
1233 m_pHelpWindow->SetText(OUString(ModuleRes(_nResId)));
1234 }
1235 
>>> CID 1297234:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "boost::bad_pointer" 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().
1236 void OGroupsSortingDialog::_propertyChanged(const 
beans::PropertyChangeEvent& _rEvent) throw( uno::RuntimeException)
1237 {
1238 uno::Reference< report::XGroup > 
xGroup(_rEvent.Source,uno::UNO_QUERY);
1239 if ( xGroup.is() )
1240 displayGroup(xGroup);
1241 else

** CID 1297233:  Null pointer dereferences  (FORWARD_NULL)
/sfx2/source/dialog/dockwin.cxx: 1245 in 
SfxDockingWindow::FillInfo(SfxChildWinInfo &) const()



*** CID 1297233:  Null pointer dereferences  (FORWARD_NULL)
/sfx2/source/dialog/dockwin.cxx: 1245 in 
SfxDockingWindow::FillInfo(SfxChildWinInfo &) const()
1239 */
1240 
1241 {
1242 if ( !pMgr )
1243 return;
1244 
>>> CID 1297233:  Null pointer dereferences  (FORWARD_NULL)
>>> Comparing "this->pImp" to null implies that "this->pImp" might be null.
1245 if ( GetFloatingWindow() && pImp && pImp->bConstructed )
1246 pImp->aWinState = GetFloatingWindow()->GetWindowState();
1247 
1248 rInfo.aWinState = pImp->aWinState;
1249 rInfo.aExtraString = "AL:(";
1250 rInfo.aExtraString += OUString::number((sal_uInt16) 
GetAlignment());

** CID 1297232:  Incorrect expression  (DIVIDE_BY_ZERO)
/sw/source/core/draw/dflyobj.cxx: 775 in SwVirtFlyDrawObj::NbcCrop(const Point 
&, const Fraction &, const Fraction &)()



*** CID 1297232:  Incorrect expression  (DIVIDE_BY_ZERO)
/sw/source/core/draw/dflyobj.cxx: 775 in SwVirtFlyDrawObj::NbcCrop(const Point 
&, const Fraction &, const Fraction &)()
769 convertTwipToMm100(a

New Defects reported by Coverity Scan for LibreOffice

2015-05-18 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.
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 6 of 6 defect(s)


** CID 1298900:  Uninitialized members  (UNINIT_CTOR)
/sc/source/filter/excel/xeextlst.cxx: 282 in 
XclExpExtCfRule::XclExpExtCfRule(const XclExpRoot &, const ScFormatEntry &, 
const ScAddress &, const rtl::OString &, int)()



*** CID 1298900:  Uninitialized members  (UNINIT_CTOR)
/sc/source/filter/excel/xeextlst.cxx: 282 in 
XclExpExtCfRule::XclExpExtCfRule(const XclExpRoot &, const ScFormatEntry &, 
const ScAddress &, const rtl::OString &, int)()
276 mxEntry.reset(new XclExpExtIconSet(*this, rIconSet, rPos));
277 pType = "iconSet";
278 }
279 default:
280 break;
281 }
>>> CID 1298900:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "pType" is not initialized in this constructor 
>>> nor in any functions that it calls.
282 }
283 
284 void XclExpExtCfRule::SaveXml( XclExpXmlStream& rStrm )
285 {
286 if (!mxEntry)
287 return;

** CID 1298899:  Resource leaks  (RESOURCE_LEAK)
/sc/qa/unit/subsequent_filters-test.cxx: 2444 in 
::testCustomIconSetsXLSX_Impl(ScDocument &, short, int, ScIconSetType, 
int)()



*** CID 1298899:  Resource leaks  (RESOURCE_LEAK)
/sc/qa/unit/subsequent_filters-test.cxx: 2444 in 
::testCustomIconSetsXLSX_Impl(ScDocument &, short, int, ScIconSetType, 
int)()
2438 else
2439 {
2440 CPPUNIT_ASSERT(pInfo);
2441 CPPUNIT_ASSERT_EQUAL(nIndex, pInfo->nIconIndex);
2442 CPPUNIT_ASSERT_EQUAL(eType, pInfo->eIconSetType);
2443 }
>>> CID 1298899:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "pInfo" going out of scope leaks the storage it points to.
2444 }
2445 
2446 }
2447 
2448 void ScFiltersTest::testComplexIconSetsXLSX()
2449 {

** CID 1298898:  Null pointer dereferences  (FORWARD_NULL)
/basctl/source/basicide/basobj3.cxx: 172 in basctl::RenameDialog(vcl::Window *, 
const basctl::ScriptDocument &, const rtl::OUString &, const rtl::OUString &, 
const rtl::OUString &)()



*** CID 1298898:  Null pointer dereferences  (FORWARD_NULL)
/basctl/source/basicide/basobj3.cxx: 172 in basctl::RenameDialog(vcl::Window *, 
const basctl::ScriptDocument &, const rtl::OUString &, const rtl::OUString &, 
const rtl::OUString &)()
166 ScopedVclPtrInstance< MessageDialog > aError(pErrorParent, 
IDE_RESSTR(RID_STR_BADSBXNAME));
167 aError->Execute();
168 return false;
169 }
170 
171 Shell* pShell = GetShell();
>>> CID 1298898:  Null pointer dereferences  (FORWARD_NULL)
>>> Comparing "pShell" to null implies that "pShell" might be null.
172 DialogWindow* pWin = pShell ? pShell->FindDlgWin(rDocument, 
rLibName, rOldName) : 0;
173 Reference< XNameContainer > xExistingDialog;
174 if ( pWin )
175 xExistingDialog = pWin->GetEditor().GetDialog();
176 
177 if ( xExistingDialog.is() )

** CID 1298897:  Control flow issues  (DEADCODE)
/oox/source/export/chartexport.cxx: 131 in 
oox::drawingmltranslateFromChart2AxisIndexToOox(int)()



*** CID 1298897:  Control flow issues  (DEADCODE)
/oox/source/export/chartexport.cxx: 131 in 
oox::drawingmltranslateFromChart2AxisIndexToOox(int)()
125 if (nIndex == 0)
126 return AXIS_PRIMARY_Y;
127 else if (nIndex == 1)
128 return AXIS_SECONDARY_Y;
129 
130 // good default value for release builds
>>> CID 1298897:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "return 2;".
131 return AXIS_PRIMARY_Y;
132 }
133 
134 }
135 
136 class lcl_MatchesRole : public ::std::unary_function< Reference< 
chart2::data::XLabeledDataSequence >, bool >

** CID 1298896:  Control flow issues  (DEADCODE)
/oox/source/export/drawingml.cxx: 1806 in 
oox::drawingml::DrawingML::getBulletMarginIndentation(com::sun::star::uno::Reference,
 short, const rtl::OUString &)()



*** CID 1298896:  Control flow issues  (DEADCODE)
/oox/source/export/drawingml.cxx: 1806 in 
oox::drawingml::DrawingML::getBulletMar

New Defects reported by Coverity Scan for LibreOffice

2015-04-15 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.
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 5 of 5 defect(s)


** CID 1294411:(RESOURCE_LEAK)
/include/LibreOfficeKit/LibreOfficeKitInit.h: 199 in lok_init_2(const char *, 
const char *)()
/include/LibreOfficeKit/LibreOfficeKitInit.h: 203 in lok_init_2(const char *, 
const char *)()



*** CID 1294411:(RESOURCE_LEAK)
/include/LibreOfficeKit/LibreOfficeKitInit.h: 199 in lok_init_2(const char *, 
const char *)()
193 fprintf( stderr, "failed to find hook in library '%s'\n", 
imp_lib );
194 _dlclose( dlhandle );
195 free( imp_lib );
196 return NULL;
197 }
198 free( imp_lib );
>>> CID 1294411:(RESOURCE_LEAK)
>>> Variable "dlhandle" going out of scope leaks the storage it points to.
199 return pSym( install_path );
200 }
201 
202 free( imp_lib );
203 return pSym2( install_path, user_profile_path );
204 }
/include/LibreOfficeKit/LibreOfficeKitInit.h: 203 in lok_init_2(const char *, 
const char *)()
197 }
198 free( imp_lib );
199 return pSym( install_path );
200 }
201 
202 free( imp_lib );
>>> CID 1294411:(RESOURCE_LEAK)
>>> Variable "dlhandle" going out of scope leaks the storage it points to.
203 return pSym2( install_path, user_profile_path );
204 }
205 
206 static
207 #ifdef __GNUC__
208 __attribute__((used))

** CID 1294410:  Control flow issues  (MISSING_BREAK)
/libreofficekit/source/gtk/lokdocview.cxx: 944 in 
LOKDocView_Impl::callbackImpl(LOKDocView_Impl::CallbackData *)()



*** CID 1294410:  Control flow issues  (MISSING_BREAK)
/libreofficekit/source/gtk/lokdocview.cxx: 944 in 
LOKDocView_Impl::callbackImpl(LOKDocView_Impl::CallbackData *)()
938 {
939 GError* pError = NULL;
940 #if GTK_CHECK_VERSION(2,14,0)
941 gtk_show_uri(NULL, pCallback->m_aPayload.c_str(), 
GDK_CURRENT_TIME, &pError);
942 #endif
943 }
>>> CID 1294410:  Control flow issues  (MISSING_BREAK)
>>> The above case falls through to this one.
944 case LOK_CALLBACK_STATE_CHANGED:
945 {
946 commandChanged(pCallback->m_aPayload);
947 }
948 break;
949 default:

** CID 1294409:(FORWARD_NULL)
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()



*** CID 1294409:(FORWARD_NULL)
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()
240 ScDocument* pDoc = pViewData->GetDocument();
241 
242 // FIXME this shouldn't be necessary once we change the entire Calc 
to
243 // work in the logic coordinates (ideally 100ths of mm - so that it 
is
244 // the same as editeng and drawinglayer), and get rid of all the
245 // SetMapMode's and other unneccessary fun we have with pixels
>>> CID 1294409:(FORWARD_NULL)
>>> Comparing "pDoc" to null implies that "pDoc" might be null.
246 if (pDoc && pDoc->GetDrawLayer() && 
pDoc->GetDrawLayer()->isTiledRendering())
247 {
248 return pViewData->GetLogicMode();
249 }
250 
251 SCTAB nTab = pViewData->GetTabNo();
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()
240 ScDocument* pDoc = pViewData->GetDocument();
241 
242 // FIXME this shouldn't be necessary once we change the entire Calc 
to
243 // work in the logic coordinates (ideally 100ths of mm - so that it 
is
244 // the same as editeng and drawinglayer), and get rid of all the
245 // SetMapMode's and other unneccessary fun we have with pixels
>>> CID 1294409:(FORWARD_NULL)
>>> Comparing "pDoc" to null implies that "pDoc" might be null.
246 if (pDoc && pDoc->GetDrawLayer() && 
pDoc->GetDrawLayer()->isTiledRendering())
247 {
248 return pViewData->GetLogicMode();
249 }
250 
251 SCTAB nTab = pViewData->GetTabNo();
/sc/source/ui/view/gridwin3.cxx: 246 in ScGridWindow::GetDrawMapMode(bool)()
240 ScDocument* pDoc = pViewData->GetDocument();
241 
242 // FIXME this shouldn't be nece

New Defects reported by Coverity Scan for LibreOffice

2015-04-18 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 1295034:  Error handling issues  (UNCAUGHT_EXCEPT)
/starmath/source/unofilter.cxx: 64 in MathTypeFilter::filter(const 
com::sun::star::uno::Sequence &)()



*** CID 1295034:  Error handling issues  (UNCAUGHT_EXCEPT)
/starmath/source/unofilter.cxx: 64 in MathTypeFilter::filter(const 
com::sun::star::uno::Sequence &)()
58 }
59 
60 MathTypeFilter::~MathTypeFilter()
61 {
62 }
63 
>>> CID 1295034:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::ucb::ContentCreationException" is 
>>> thrown but the throw list "throw(com::sun::star::uno::RuntimeException, 
>>> std::exception)" doesn't allow it to be thrown. This will cause a call to 
>>> unexpected() which usually calls terminate().
64 sal_Bool MathTypeFilter::filter(const 
uno::Sequence& rDescriptor) throw(uno::RuntimeException, 
std::exception)
65 {
66 bool bSuccess = false;
67 utl::MediaDescriptor aMediaDesc(rDescriptor);
68 aMediaDesc.addInputStream();
69 uno::Reference xInputStream;



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2015-04-29 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.
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 11 of 11 defect(s)


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



*** CID 1296217:  Memory - illegal accesses  (USE_AFTER_FREE)
/sw/source/core/layout/sectfrm.cxx: 356 in SwSectionFrm::Paste(SwFrm *, SwFrm 
*)()
350 pSect->SetFollow( 
static_cast(pParent)->GetFollow() );
351 static_cast(pParent)->SetFollow( NULL );
352 if( pSect->GetFollow() )
353 pParent->_InvalidateSize();
354 
355 InsertGroupBefore( pParent, pSibling, pSect );
>>> CID 1296217:  Memory - illegal accesses  (USE_AFTER_FREE)
>>> Calling "Init" dereferences freed pointer "pSect".
356 pSect->Init();
357 (pSect->*fnRect->fnMakePos)( pSect->GetUpper(), 
pSect->GetPrev(), true);
358 if( !static_cast(pParent)->Lower() )
359 {
360 SwSectionFrm::MoveCntntAndDelete( 
static_cast(pParent), false );
361 pParent = this;

** CID 1296216:  Error handling issues  (UNCAUGHT_EXCEPT)
/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx: 639 in 
chart::wrapper::DataSeriesPointWrapper::getPropertyState(const rtl::OUString 
&)()



*** CID 1296216:  Error handling issues  (UNCAUGHT_EXCEPT)
/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx: 639 in 
chart::wrapper::DataSeriesPointWrapper::getPropertyState(const rtl::OUString 
&)()
633 return m_spChart2ModelContact->GetPageSize();
634 }
635 
636 // WrappedPropertySet
637 
638 //XPropertyState
>>> CID 1296216:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::lang::WrappedTargetException" is 
>>> thrown but the throw list "throw(com::sun::star::uno::RuntimeException, 
>>> com::sun::star::beans::UnknownPropertyException, std::exception)" doesn't 
>>> allow it to be thrown. This will cause a call to unexpected() which usually 
>>> calls terminate().
639 beans::PropertyState SAL_CALL DataSeriesPointWrapper::getPropertyState( 
const OUString& rPropertyName )
640 throw 
(beans::UnknownPropertyException, uno::RuntimeException, std::exception)
641 {
642 beans::PropertyState aState( beans::PropertyState_DIRECT_VALUE );
643 if (rPropertyName == "SymbolBitmapURL")
644 {

** CID 1296215:  Null pointer dereferences  (REVERSE_INULL)
/vcl/source/window/mouse.cxx: 286 in vcl::Window::ImplGrabFocus(unsigned 
short)()



*** CID 1296215:  Null pointer dereferences  (REVERSE_INULL)
/vcl/source/window/mouse.cxx: 286 in vcl::Window::ImplGrabFocus(unsigned 
short)()
280 bMustNotGrabFocus = true;
281 break;
282 }
283 pParent = pParent->mpWindowImpl->mpParent;
284 }
285 
>>> CID 1296215:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "this->mpWindowImpl" suggests that it may be null, but it 
>>> has already been dereferenced on all paths leading to the check.
286 if ( ( pSVData->maWinData.mpFocusWin.get() != this &&
287mpWindowImpl && !mpWindowImpl->mbInDispose ) ||
288  ( bAsyncFocusWaiting && !bHasFocus && !bMustNotGrabFocus ) )
289 {
290 // EndExtTextInput if it is not the same window
291 if ( pSVData->maWinData.mpExtTextInputWin &&

** CID 1296214:  Null pointer dereferences  (NULL_RETURNS)
/formula/source/core/api/FormulaCompiler.cxx: 1878 in 
formula::FormulaCompiler::CreateStringFromToken(rtl::OUStringBuffer &, const 
formula::FormulaToken *, bool)()



*** CID 1296214:  Null pointer dereferences  (NULL_RETURNS)
/formula/source/core/api/FormulaCompiler.cxx: 1878 in 
formula::FormulaCompiler::CreateStringFromToken(rtl::OUStringBuffer &, const 
formula::FormulaToken *, bool)()
1872 {
1873 // Suppress all TableRef related tokens, the 
resulting
1874 // range was written by CreateStringFromIndex().
1875 const FormulaToken* const p = pArr->PeekNext();
1876 if (p && p->GetOpCode() == ocTableRefOpen)
1877 {
>>> CID 1296214:  Null pointer dereferences  (N

New Defects reported by Coverity Scan for LibreOffice

2015-05-01 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 1296293:  Uninitialized members  (UNINIT_CTOR)
/svx/source/engine3d/float3d.cxx: 324 in Svx3DWin::Svx3DWin(SfxBindings *, 
SfxChildWindow *, vcl::Window *)()



*** CID 1296293:  Uninitialized members  (UNINIT_CTOR)
/svx/source/engine3d/float3d.cxx: 324 in Svx3DWin::Svx3DWin(SfxBindings *, 
SfxChildWindow *, vcl::Window *)()
318 Reset();
319 
320 //lock down the size of the initial largest default mode as the 
permanent size
321 aSize = get_preferred_size();
322 set_width_request(aSize.Width());
323 set_height_request(aSize.Height());
>>> CID 1296293:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "ePoolUnit" is not initialized in this 
>>> constructor nor in any functions that it calls.
324 }
325 
326 Svx3DWin::~Svx3DWin()
327 {
328 disposeOnce();
329 }

** CID 1296292:  Incorrect expression  (MIXED_ENUMS)
/sc/source/ui/miscdlgs/highred.cxx: 226 in 
ScHighlightChgDlg::OKBtnHdl(PushButton *)()



*** CID 1296292:  Incorrect expression  (MIXED_ENUMS)
/sc/source/ui/miscdlgs/highred.cxx: 226 in 
ScHighlightChgDlg::OKBtnHdl(PushButton *)()
220 IMPL_LINK( ScHighlightChgDlg, OKBtnHdl, PushButton*, pOKBtn )
221 {
222 if (pOKBtn == m_pOkButton)
223 {
224 aChangeViewSet.SetShowChanges(m_pHighlightBox->IsChecked());
225 aChangeViewSet.SetHasDate(m_pFilterCtr->IsDate());
>>> CID 1296292:  Incorrect expression  (MIXED_ENUMS)
>>> Mixing enum types "ScChgsDateMode" and "SvxRedlinDateMode" for "eMode".
226 ScChgsDateMode eMode = (ScChgsDateMode) 
m_pFilterCtr->GetDateMode();
227 aChangeViewSet.SetTheDateMode( eMode );
228 Date aFirstDate( m_pFilterCtr->GetFirstDate() );
229 tools::Time aFirstTime( m_pFilterCtr->GetFirstTime() );
230 Date aLastDate( m_pFilterCtr->GetLastDate() );
231 tools::Time aLastTime( m_pFilterCtr->GetLastTime() );



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

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

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


New Defects reported by Coverity Scan for LibreOffice

2017-09-22 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.
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 7 of 7 defect(s)


** CID 1418341:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/core/data/fillinfo.cxx: 441 in ScDocument::FillInfo(ScTableInfo &, 
short, int, short, int, short, double, double, bool, bool, const ScMarkData *)()



*** CID 1418341:  Null pointer dereferences  (FORWARD_NULL)
/sc/source/core/data/fillinfo.cxx: 441 in ScDocument::FillInfo(ScTableInfo &, 
short, int, short, int, short, double, double, bool, bool, const ScMarkData *)()
435 //  to nRotMax due to nRotateDir Flag
436 initCellInfo(pRowInfo, nArrCount, nRotMax, pDefShadow);
437 
438 initColWidths(pRowInfo, this, fColScale, nTab, nCol2, nRotMax);
439 
440 ScConditionalFormatList* pCondFormList = GetCondFormList(nTab);
>>> CID 1418341:  Null pointer dereferences  (FORWARD_NULL)
>>> Comparing "pCondFormList" to null implies that "pCondFormList" might be 
>>> null.
441 if(pCondFormList)
442 pCondFormList->startRendering();
443 
444 for (SCCOL nArrCol=0; nArrCol<=nCol2+2; nArrCol++)  
  // left & right + 1
445 {
446 SCCOL nX = (nArrCol>0) ? nArrCol-1 : MAXCOL+1;  
  // negative -> invalid

** CID 1418340:  Integer handling issues  (DIVIDE_BY_ZERO)
/sw/source/uibase/docvw/PostItMgr.cxx: 1065 in SwPostItMgr::AutoScroll(const 
sw::annotation::SwAnnotationWin *, unsigned long)()



*** CID 1418340:  Integer handling issues  (DIVIDE_BY_ZERO)
/sw/source/uibase/docvw/PostItMgr.cxx: 1065 in SwPostItMgr::AutoScroll(const 
sw::annotation::SwAnnotationWin *, unsigned long)()
1059 if ( !(bBottom && bTop))
1060 {
1061 const long aDiff = bBottom ? 
mpEditWin->LogicToPixel(Point(0,mPages[aPage-1]->mPageRect.Top() + 
aSidebarheight)).Y() - pPostIt->GetPosPixel().Y() :
1062 
mpEditWin->LogicToPixel(Point(0,mPages[aPage-1]->mPageRect.Bottom() - 
aSidebarheight)).Y() - 
(pPostIt->GetPosPixel().Y()+pPostIt->GetSizePixel().Height());
1063 // this just adds the missing value to get the next a* 
GetScrollSize() after aDiff
1064 // e.g aDiff= 61 POSTIT_SCROLL=50 --> lScroll = 100
>>> CID 1418340:  Integer handling issues  (DIVIDE_BY_ZERO)
>>> In expression "aDiff % this->GetScrollSize()", modulo by expression 
>>> "this->GetScrollSize()" which may be zero has undefined behavior.
1065 const long lScroll = bBottom ? (aDiff + ( GetScrollSize() 
- (aDiff % GetScrollSize( : (aDiff - (GetScrollSize() + (aDiff % 
GetScrollSize(;
1066 Scroll(lScroll, aPage);
1067 }
1068 }
1069 }
1070 

** CID 1418339:(RESOURCE_LEAK)
/vcl/unx/generic/printer/cpdmgr.cxx: 424 in 
psp::CPDManager::createCPDParser(const rtl::OUString &)()
/vcl/unx/generic/printer/cpdmgr.cxx: 439 in 
psp::CPDManager::createCPDParser(const rtl::OUString &)()
/vcl/unx/generic/printer/cpdmgr.cxx: 456 in 
psp::CPDManager::createCPDParser(const rtl::OUString &)()



*** CID 1418339:(RESOURCE_LEAK)
/vcl/unx/generic/printer/cpdmgr.cxx: 424 in 
psp::CPDManager::createCPDParser(const rtl::OUString &)()
418 aValueName = OStringToOUString( "", aEncoding );
419 pValue = pKey->insertValue( aValueName, eQuoted );
420 if( pValue )
421 pValue->m_aValue = aValueName;
422 pKey -> m_pDefaultValue = pValue;
423 
>>> CID 1418339:(RESOURCE_LEAK)
>>> Overwriting "pKey" in "pKey = new psp::PPDKey(rtl::OUString 
>>> const("NickName", rtl::libreoffice_internal::Dummy({})))" leaks the storage 
>>> that "pKey" points to.
424 pKey = new PPDKey("NickName");
425 aValueName = OStringToOUString( pDest -> name, aEncoding );
426 pValue = pKey->insertValue( aValueName, eQuoted );
427 if( pValue )
428 pValue->m_aValue = aValueName;
429 pKey -> m_pDefaultValue = pValue;
/vcl/unx/generic/printer/cpdmgr.cxx: 439 in 
psp::CPDManager::createCPDParser(const rtl::OUString &)()
433 PPDContext& rContext = m_aDefaultContexts[ aPrinter ];
434 rContext.setParser( pNewParser );
435 setDefaultPaper( rContext );
436 std::ve

New Defects reported by Coverity Scan for LibreOffice

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


** CID 1417678:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/uibase/dbui/dbmgr.cxx: 805 in SwDBManager::~SwDBManager()()



*** CID 1417678:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/uibase/dbui/dbmgr.cxx: 805 in SwDBManager::~SwDBManager()()
799 , pImpl(new SwDBManager_Impl(*this))
800 , pMergeEvtSrc(nullptr)
801 , m_pDoc(pDoc)
802 {
803 }
804 
>>> CID 1417678:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::DeploymentException" 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().
805 SwDBManager::~SwDBManager()
806 {
807 RevokeLastRegistrations();
808 
809 // copy required, m_DataSourceParams can be modified while 
disposing components
810 std::vector> aCopiedConnections;



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyiAzi-2BqiP-2Fn0GhZ6XMoxLNyoKPGshfD1uM1PypPY9M-2F5f1bZDKVSQrvyuRHbqdJQPwoTl8MPwPr4unUNVvPs1HkkQDWZAvNI-2BejQFv93g4DzkzXtzNq7s31qo8Ayuva9vChXGvWsDewrjsUHa-2FezMxCZj-2BcPgPOq5gqCyxjqEyMc-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-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyiAzi-2BqiP-2Fn0GhZ6XMoxLNzu6kMKbrG1No7X1McLLYrBf-2Fh-2FZnWSHLpHQ8CeUn6S7vYuDVDf7IcovXIlanQVgO0vJjUY-2BphIDCrXzaXZyTU4F6Pp8PK95-2FsJB9zLXD8yu0EeuOynh3L8d3pKVqjYEB8W1cOnB6QRMvCAwyiUPFDA-3D

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


New Defects reported by Coverity Scan for LibreOffice

2017-09-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.
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 1418672:  Null pointer dereferences  (FORWARD_NULL)
/sot/source/sdstor/stgio.cxx: 100 in StgIo::SetupStreams()()



*** CID 1418672:  Null pointer dereferences  (FORWARD_NULL)
/sot/source/sdstor/stgio.cxx: 100 in StgIo::SetupStreams()()
94 sal_Int32 nFatStrmSize;
95 if (o3tl::checked_multiply(m_aHdr.GetFATSize(), 
nPhysPageSize, nFatStrmSize))
96 {
97 SAL_WARN("sot", "Error: " << m_aHdr.GetFATSize() << " * " << 
nPhysPageSize << " would overflow");
98 SetError(SVSTREAM_FILEFORMAT_ERROR);
99 m_pFAT = nullptr;
>>> CID 1418672:  Null pointer dereferences  (FORWARD_NULL)
>>> Assigning: "this->m_pTOC" = "NULL".
100 m_pTOC = nullptr;
101 }
102 else
103 {
104 m_pFAT = new StgFATStrm(*this, nFatStrmSize);
105 m_pTOC = new StgDirStrm( *this );



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyjHImzuEmcnYXTs-2Fi-2FFXWLe7SqrO7BzRy-2F1FLdrLyL0UVr2KXSsrfVKsB8Jr7WvWyJ1hY3Gi1KXq8qwXZ7UBQcJh3C-2FOnhXv7CQrDVnxpSUN8FCkvsriyU0nSD72Jufr03KTX2lAvKvUkWXWdOkln0TS6CsENzlZG6PYEbPMNR14-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-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyjHImzuEmcnYXTs-2Fi-2FFXWLUm1MW8M1WyS3e6Frw5HyguY2G5klSfneBCGMWBj5LHXdSB0gh7aLKEDUfSIal5UIUTnJe2ioeeJSZ7bMlNAYY7UGMMeuSDxmz8RNV5fL8YEDBFSQhz7Az0z7ci-2Fg8kaKCsdCQ1o-2FKUeiad16knw4JU-3D

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


New Defects reported by Coverity Scan for LibreOffice

2017-10-05 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.
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 8 of 8 defect(s)


** CID 1418967:  Uninitialized variables  (UNINIT)



*** CID 1418967:  Uninitialized variables  (UNINIT)
/sc/source/ui/view/viewdata.cxx: 572 in ScViewData::ScViewData(ScDocShell *, 
ScTabViewShell *)()
566 if (pDoc)
567 {
568 SCTAB nTableCount = pDoc->GetTableCount();
569 EnsureTabDataSize(nTableCount);
570 }
571 
>>> CID 1418967:  Uninitialized variables  (UNINIT)
>>> Using uninitialized value "this->nPPTY" when calling "CalcPPT".
572 CalcPPT();
573 }
574 
575 ScViewData::ScViewData( const ScViewData& rViewData ) :
576 maTabData( rViewData.maTabData ),
577 mpMarkData(new ScMarkData(*rViewData.mpMarkData)),

** CID 1418966:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/control/ctrl.cxx: 430 in Control::LogicInvalidate(const 
tools::Rectangle *)()



*** CID 1418966:  Null pointer dereferences  (FORWARD_NULL)
/vcl/source/control/ctrl.cxx: 430 in Control::LogicInvalidate(const 
tools::Rectangle *)()
424 // If parent is a floating window, trigger an invalidate there
425 vcl::Window* pWindow = this;
426 while (pWindow)
427 {
428 if (pWindow->ImplIsFloatingWindow())
429 {
>>> CID 1418966:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "dynamic_cast (pWindow)" to 
>>> "LogicInvalidate", which dereferences it. (The dereference happens because 
>>> this is a virtual function call.)
430 
dynamic_cast(pWindow)->LogicInvalidate(nullptr);
431 return;
432 }
433 
434 pWindow = pWindow->GetParent();
435 }

** CID 1418965:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/view/tabview.cxx: 2346 in 
BoundsProvider::BoundsProvider(ScDocument *, short)()



*** CID 1418965:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/view/tabview.cxx: 2346 in 
BoundsProvider::BoundsProvider(ScDocument *, short)()
2340 long nSecondPositionPx;
2341 
2342 public:
2343 BoundsProvider(ScDocument* pD, SCTAB nT)
2344 : pDoc(pD)
2345 , nTab(nT)
>>> CID 1418965:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "nSecondPositionPx" is not initialized in this 
>>> constructor nor in any functions that it calls.
2346 {}
2347 
2348 void GetStartIndexAndPosition(index_type& nIndex, long& nPosition) 
const
2349 {
2350 nIndex = nFirstIndex;
2351 nPosition = nFirstPositionPx;

** CID 1418964:  Incorrect expression  (COPY_PASTE_ERROR)
/sc/source/ui/view/viewdata.cxx: 221 in 
ScPositionHelper::getNearestByPosition(long) const()



*** CID 1418964:  Incorrect expression  (COPY_PASTE_ERROR)
/sc/source/ui/view/viewdata.cxx: 221 in 
ScPositionHelper::getNearestByPosition(long) const()
215 if (posUB == mData.begin())
216 {
217 return *posUB;
218 }
219 
220 auto posLB = std::prev(posUB);
>>> CID 1418964:  Incorrect expression  (COPY_PASTE_ERROR)
>>> "posUB" looks like a copy-paste error.
221 if (posUB == mData.end())
222 {
223 return *posLB;
224 }
225 
226 long nDiffUB = posUB->second - nPos;

** CID 1418963:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/view/tabview.cxx: 2346 in 
BoundsProvider::BoundsProvider(ScDocument *, short)()



*** CID 1418963:  Uninitialized members  (UNINIT_CTOR)
/sc/source/ui/view/tabview.cxx: 2346 in 
BoundsProvider::BoundsProvider(ScDocument *, short)()
2340 long nSecondPositionPx;
2341 
2342 public:
2343 BoundsProvider(ScDocument* pD, SCTAB nT)
2344 : pDoc(pD)
2345 , nTab(nT)
>>> CID 1418963:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "nSecondPositionPx" is not initialized in this 
>>> constructor nor in any functions that it calls.
2346 {}
2347 
2348 void GetStartIndexAndPosition(index_type& nIndex, long& nPosition) 
const
2349   

New Defects reported by Coverity Scan for LibreOffice

2017-10-07 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.
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 3 of 3 defect(s)


** CID 1418980:(RESOURCE_LEAK)
/sw/source/filter/ww8/docxexport.cxx: 1068 in DocxExport::WriteSettings()()
/sw/source/filter/ww8/docxexport.cxx: 1068 in DocxExport::WriteSettings()()



*** CID 1418980:(RESOURCE_LEAK)
/sw/source/filter/ww8/docxexport.cxx: 1068 in DocxExport::WriteSettings()()
1062 
1063 sax_fastparser::XFastAttributeListRef 
xAttributeList(pAttributeList);
1064 pFS->singleElementNS(XML_w, 
XML_documentProtection, xAttributeList);
1065 
1066 hasProtectionProperties = true;
1067 }
>>> CID 1418980:(RESOURCE_LEAK)
>>> Variable "pAttributeList" going out of scope leaks the storage it 
>>> points to.
1068 }
1069 }
1070 }
1071 
1072 // Protect form
1073 // Section-specific write protection
/sw/source/filter/ww8/docxexport.cxx: 1068 in DocxExport::WriteSettings()()
1062 
1063 sax_fastparser::XFastAttributeListRef 
xAttributeList(pAttributeList);
1064 pFS->singleElementNS(XML_w, 
XML_documentProtection, xAttributeList);
1065 
1066 hasProtectionProperties = true;
1067 }
>>> CID 1418980:(RESOURCE_LEAK)
>>> Variable "pAttributeList" going out of scope leaks the storage it 
>>> points to.
1068 }
1069 }
1070 }
1071 
1072 // Protect form
1073 // Section-specific write protection

** CID 1418979:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/core/edit/edfcol.cxx: 1232 in 
SwUndoParagraphSigning::SwUndoParagraphSigning(const SwPosition &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, bool)()



*** CID 1418979:  API usage errors  (INVALIDATE_ITERATOR)
/sw/source/core/edit/edfcol.cxx: 1232 in 
SwUndoParagraphSigning::SwUndoParagraphSigning(const SwPosition &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, bool)()
1226 const auto it = aStatements.find(ParagraphSignatureRDFName);
1227 if (it != aStatements.end())
1228 m_signature = it->second;
1229 
1230 const auto it2 = aStatements.find(ParagraphSignatureUsageRDFName);
1231 if (it2 != aStatements.end())
>>> CID 1418979:  API usage errors  (INVALIDATE_ITERATOR)
>>> Dereferencing iterator "it" though it is already past the end of its 
>>> container.
1232 m_usage = it->second;
1233 
1234 uno::Reference xText(m_xField, 
uno::UNO_QUERY);
1235 m_display = xText->getString();
1236 }
1237 

** CID 1418978:  Incorrect expression  (COPY_PASTE_ERROR)
/sw/source/core/edit/edfcol.cxx: 1232 in 
SwUndoParagraphSigning::SwUndoParagraphSigning(const SwPosition &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, bool)()



*** CID 1418978:  Incorrect expression  (COPY_PASTE_ERROR)
/sw/source/core/edit/edfcol.cxx: 1232 in 
SwUndoParagraphSigning::SwUndoParagraphSigning(const SwPosition &, const 
com::sun::star::uno::Reference &, const 
com::sun::star::uno::Reference &, bool)()
1226 const auto it = aStatements.find(ParagraphSignatureRDFName);
1227 if (it != aStatements.end())
1228 m_signature = it->second;
1229 
1230 const auto it2 = aStatements.find(ParagraphSignatureUsageRDFName);
1231 if (it2 != aStatements.end())
>>> CID 1418978:  Incorrect expression  (COPY_PASTE_ERROR)
>>> "it" looks like a copy-paste error.
1232 m_usage = it->second;
1233 
1234 uno::Reference xText(m_xField, 
uno::UNO_QUERY);
1235 m_display = xText->getString();
1236 }
1237 



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyfCGDqp3k-2Fc5S3-2BFMC4UxLGuv-2FigefyuQYHgYrZtg7TpmUbbn-2FWaWLwKUM4tMp-2FFGoQV4Z8rMzRuBbp1hP-2BhuinEerbp0u80IS-2FUqKrPdpiWwVHVCeiB1g-2BoleSsW2htcOtU9HkfeamjKVM

New Defects reported by Coverity Scan for LibreOffice

2017-10-15 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 1419773:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/window/dialog.cxx: 498 in Dialog::Dialog(WindowType)()



*** CID 1419773:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/window/dialog.cxx: 498 in Dialog::Dialog(WindowType)()
492 
493 Dialog::Dialog( WindowType nType )
494 : SystemWindow( nType )
495 , mnInitFlag(InitFlag::Default)
496 {
497 ImplInitDialogData();
>>> CID 1419773:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mbForceBorderWindow" is not initialized in 
>>> this constructor nor in any functions that it calls.
498 }
499 
500 void VclBuilderContainer::disposeBuilder()
501 {
502 if (m_pUIBuilder)
503 m_pUIBuilder->disposeBuilder();

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



*** CID 1401342:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/6.3.1/bits/shared_ptr_base.h: 527 in 
std::_Sp_counted_ptr_inplace, 
(__gnu_cxx::_Lock_policy)2>::_M_dispose()()
521   std::forward<_Args>(__args)...); // might throw
522 }
523 
524   ~_Sp_counted_ptr_inplace() noexcept { }
525 
526   virtual void
>>> CID 1401342:  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().
527   _M_dispose() noexcept
528   {
529 allocator_traits<_Alloc>::destroy(_M_impl._M_alloc(), _M_ptr());
530   }
531 
532   // Override because the allocator needs to know the dynamic type



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyY3rJftnkY1zqIpu9BzdDNR955xgx01Ooe8j5DnxPauPHut6gW1VRRsuh3O-2Bw33gT-2FnzfpPQtazVALyn2UyFq-2B9VmPMn2nHfYJfrHAjRtqmnRF8i588huaoegCdX83VIH6xtR7gz59NxNwe2oTxkc83qBD99Zz3v3IlFZ8dkE3us-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-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyY3rJftnkY1zqIpu9BzdDNXeGHv5USKm5BTjj4Mn-2FWNJfRMJj530AM3zJX7CgkY8Q-2FHefSAbOEBsQBApZJc-2FUwu7lZgWirBNhvY78wl3AeoeNho3DJiNfxPUZG6wLjSDkg442D8QMzW3W4NOOoEvcZ5xit7M5dmqULocWnnNjIQI-3D

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


New Defects reported by Coverity Scan for LibreOffice

2018-06-01 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.
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 12 of 12 defect(s)


** CID 1435920:(RESOURCE_LEAK)
/sc/source/core/data/conditio.cxx: 1162 in ScConditionEntry::IsValidStr(const 
rtl::OUString &, const ScAddress &) const()
/sc/source/core/data/conditio.cxx: 1171 in ScConditionEntry::IsValidStr(const 
rtl::OUString &, const ScAddress &) const()
/sc/source/core/data/conditio.cxx: 1175 in ScConditionEntry::IsValidStr(const 
rtl::OUString &, const ScAddress &) const()
/sc/source/core/data/conditio.cxx: 1205 in ScConditionEntry::IsValidStr(const 
rtl::OUString &, const ScAddress &) const()
/sc/source/core/data/conditio.cxx: 1224 in ScConditionEntry::IsValidStr(const 
rtl::OUString &, const ScAddress &) const()



*** CID 1435920:(RESOURCE_LEAK)
/sc/source/core/data/conditio.cxx: 1162 in ScConditionEntry::IsValidStr(const 
rtl::OUString &, const ScAddress &) const()
1156 return false;
1157 
1158 OUString aUpVal1( aStrVal1 ); //TODO: As a member? (Also set in 
Interpret)
1159 OUString aUpVal2( aStrVal2 );
1160 
1161 if ( eOp == ScConditionMode::Between || eOp == 
ScConditionMode::NotBetween )
>>> CID 1435920:(RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "ScGlobal::GetCollator()" 
>>> leaks it.
1162 if (ScGlobal::GetCollator()->compareString( aUpVal1, aUpVal2 ) 
> 0)
1163 {
1164 // Right order for value range
1165 OUString aTemp( aUpVal1 ); aUpVal1 = aUpVal2; aUpVal2 = 
aTemp;
1166 }
1167 
/sc/source/core/data/conditio.cxx: 1171 in ScConditionEntry::IsValidStr(const 
rtl::OUString &, const ScAddress &) const()
1165 OUString aTemp( aUpVal1 ); aUpVal1 = aUpVal2; aUpVal2 = 
aTemp;
1166 }
1167 
1168 switch ( eOp )
1169 {
1170 case ScConditionMode::Equal:
>>> CID 1435920:(RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "ScGlobal::GetCollator()" 
>>> leaks it.
1171 bValid = (ScGlobal::GetCollator()->compareString(
1172 rArg, aUpVal1 ) == 0);
1173 break;
1174 case ScConditionMode::NotEqual:
1175 bValid = (ScGlobal::GetCollator()->compareString(
1176 rArg, aUpVal1 ) != 0);
/sc/source/core/data/conditio.cxx: 1175 in ScConditionEntry::IsValidStr(const 
rtl::OUString &, const ScAddress &) const()
1169 {
1170 case ScConditionMode::Equal:
1171 bValid = (ScGlobal::GetCollator()->compareString(
1172 rArg, aUpVal1 ) == 0);
1173 break;
1174 case ScConditionMode::NotEqual:
>>> CID 1435920:(RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "ScGlobal::GetCollator()" 
>>> leaks it.
1175 bValid = (ScGlobal::GetCollator()->compareString(
1176 rArg, aUpVal1 ) != 0);
1177 break;
1178 case ScConditionMode::TopPercent:
1179 case ScConditionMode::BottomPercent:
1180 case ScConditionMode::Top10:
/sc/source/core/data/conditio.cxx: 1205 in ScConditionEntry::IsValidStr(const 
rtl::OUString &, const ScAddress &) const()
1199 bValid = rArg.indexOf(aUpVal1) != -1;
1200 if(eOp == ScConditionMode::NotContainsText)
1201 bValid = !bValid;
1202 break;
1203 default:
1204 {
>>> CID 1435920:(RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "ScGlobal::GetCollator()" 
>>> leaks it.
1205 sal_Int32 nCompare = 
ScGlobal::GetCollator()->compareString(
1206 rArg, aUpVal1 );
1207 switch ( eOp )
1208 {
1209 case ScConditionMode::Greater:
1210 bValid = ( nCompare > 0 );
/sc/source/core/data/conditio.cxx: 1224 in ScConditionEntry::IsValidStr(const 
rtl::OUString &, const ScAddress &) const()
1218 case ScConditionMode::EqLess:
1219 bValid = ( nCompare <= 0 );
1220 break;
1221 case ScConditionMode::Between:
1222 case ScConditionMode::NotBetween:
1223 //  Test for NOTBETWEEN:
>>> CID 1435920:(RESOURCE_LEAK)
>>> Failing to save or free storage allocated by "ScGlobal::GetCollator()" 
>>> leaks it.
1224 bValid = ( nCompare < 0 ||
1225 ScGlobal::Get

New Defects reported by Coverity Scan for LibreOffice

2018-06-09 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.
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 7 of 7 defect(s)


** CID 1436018:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1436018:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/text/txtfrm.cxx: 1991 in SwTextFrame::SwClientNotify(const 
SwModify &, const SfxHint &)()
1985 }
1986 
1987 if (nClear || (m_pMergedPara &&
1988 (m_pMergedPara->pParaPropsNode != &rModify ||
1989  m_pMergedPara->pFirstNode != &rModify)))
1990 {
>>> CID 1436018:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pOld" to "SwAttrSetChg", which dereferences it.
1991 SwAttrSetChg aOldSet( *static_cast(pOld) );
1992 SwAttrSetChg aNewSet( *static_cast(pNew) );
1993 
1994 if (m_pMergedPara && m_pMergedPara->pParaPropsNode 
!= &rModify)
1995 {
1996 for (sal_uInt16 i = RES_PARATR_BEGIN; i != 
RES_FRMATR_END; ++i)

** CID 1436017:  Control flow issues  (DEADCODE)
/sw/source/core/text/txtfrm.cxx: 1634 in SwTextFrame::SwClientNotify(const 
SwModify &, const SfxHint &)()



*** CID 1436017:  Control flow issues  (DEADCODE)
/sw/source/core/text/txtfrm.cxx: 1634 in SwTextFrame::SwClientNotify(const 
SwModify &, const SfxHint &)()
1628 // update merged before doing anything else
1629 nLen = UpdateMergedParaForDelete(*m_pMergedPara, false, 
rNode, nNPos, nNLen);
1630 const sal_Int32 m = -nNLen;
1631 if (nLen && IsIdxInside(nPos, nLen))
1632 {
1633 if (!nLen)
>>> CID 1436017:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "this->InvalidateSize();".
1634 InvalidateSize();
1635 else
1636 InvalidateRange( SwCharRange(nPos, 
TextFrameIndex(1)), m );
1637 }
1638 lcl_SetWrong( *this, rNode, nNPos, m, true );
1639 if (nLen)

** CID 1436016:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1436016:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/crsr/crsrsh.cxx: 967 in SwCursorShell::TestCurrPam(const Point 
&, bool)()
961 do {
962 if( pCmp && pCmp->HasMark() &&
963 *pCmp->Start() <= aPtPos && *pCmp->End() > aPtPos )
964 {
965 return true;   // return without update
966 }
>>> CID 1436016:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pCmp" to "GetNext", which dereferences it.
967 } while( m_pCurrentCursor != ( pCmp = pCmp->GetNext() ) );
968 return false;
969 }
970 
971 void SwCursorShell::KillPams()
972 {

** CID 1436015:  Code maintainability issues  (UNUSED_VALUE)
/oox/source/drawingml/diagram/diagramlayoutatoms.cxx: 373 in 
oox::drawingml::AlgAtom::layoutShape(const 
std::shared_ptr &, const 
std::vector> &) const()



*** CID 1436015:  Code maintainability issues  (UNUSED_VALUE)
/oox/source/drawingml/diagram/diagramlayoutatoms.cxx: 373 in 
oox::drawingml::AlgAtom::layoutShape(const 
std::shared_ptr &, const 
std::vector> &) const()
367 aChildSize.Height /= (nCount+1);
368 
369 awt::Point aCurrPos(0, 0);
370 if (nIncX == -1)
371 aCurrPos.X = rShape->getSize().Width - aChildSize.Width;
372 if (nIncY == -1)
>>> CID 1436015:  Code maintainability issues  (UNUSED_VALUE)
>>> Assigning value from "rShape->getSize().Height - aChildSize.Height" to 
>>> "aCurrPos.Y" here, but that stored value is overwritten before it can be 
>>> used.
373 aCurrPos.Y = rShape->getSize().Height - 
aChildSize.Height;
374 
375 if(nCount <= 2 && nIncY == -1)
376 aCurrPos.Y = rShape->getSize().Height - 
aChildSize.Height*2;
377 else
378 aCurrPos.Y = rShape->getSize().Height - 
aChildSize.Height*(nCount+1);

** CID 1436014:  Null pointer dereferences  (NULL_RETURNS)



New Defects reported by Coverity Scan for LibreOffice

2018-06-12 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.
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 2 of 2 defect(s)


** CID 1436922:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/text/txtfrm.cxx: 1987 in SwTextFrame::SwClientNotify(const 
SwModify &, const SfxHint &)()



*** CID 1436922:  Null pointer dereferences  (REVERSE_INULL)
/sw/source/core/text/txtfrm.cxx: 1987 in SwTextFrame::SwClientNotify(const 
SwModify &, const SfxHint &)()
1981 InvalidatePrt_();
1982 }
1983 
1984 const bool bMergeModify = (m_pMergedPara &&
1985 (m_pMergedPara->pParaPropsNode != &rModify ||
1986  m_pMergedPara->pFirstNode != &rModify));
>>> CID 1436922:  Null pointer dereferences  (REVERSE_INULL)
>>> Null-checking "pNew" suggests that it may be null, but it has already 
>>> been dereferenced on all paths leading to the check.
1987 const bool bHasOldNew = pOld && pNew;
1988 if ((nClear || bMergeModify) && bHasOldNew)
1989 {
1990 SwAttrSetChg aOldSet( *static_cast(pOld) );
1991 SwAttrSetChg aNewSet( *static_cast(pNew) );
1992 

** CID 1436921:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/vcl/unx/generic/app/sm.cxx: 73 in X11SalInstance::CreateSalSession()()



*** CID 1436921:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/vcl/unx/generic/app/sm.cxx: 73 in X11SalInstance::CreateSalSession()()
67 
68 std::unique_ptr X11SalInstance::CreateSalSession()
69 {
70 SAL_INFO("vcl.sm", "X11SalInstance::CreateSalSession");
71 
72 std::unique_ptr p(new IceSalSession);
>>> CID 1436921:  Memory - illegal accesses  (WRAPPER_ESCAPE)
>>> The internal representation of local "p" escapes, but is destroyed when 
>>> it exits scope.
73 SessionManagerClient::open(p.get());
74 return p;
75 }
76 
77 void IceSalSession::queryInteraction()
78 {



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyXqpsGoC-2BHiF-2Bd8nuqU01dMYx-2FK7rMr7LJqVacKLBW2BYJH8puO4nTs7Z6LYrxkQ4Yq0hogRakLNsHFnhjVTrFKy8Fl1HS040jJylvu9fVG3PTqzvUSRW7nqWgJnFjYsRQ7cf7b3YFK-2FBqkfH9Hn2PnmNmBWIMGk700NfzJmosJs-3D

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


New Defects reported by Coverity Scan for LibreOffice

2017-12-05 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.
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 3 of 3 defect(s)


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



*** CID 1425725:  Incorrect expression  (MIXED_ENUMS)
/sw/source/uibase/config/modcfg.cxx: 258 in 
SwRevisionConfig::SwRevisionConfig()()
252 aInsertAttr.m_nAttr = LINESTYLE_SINGLE;
253 aInsertAttr.m_nColor = COL_TRANSPARENT;
254 aDeletedAttr.m_nItemId = SID_ATTR_CHAR_STRIKEOUT;
255 aDeletedAttr.m_nAttr = STRIKEOUT_SINGLE;
256 aDeletedAttr.m_nColor = COL_TRANSPARENT;
257 aFormatAttr.m_nItemId = SID_ATTR_CHAR_WEIGHT;
>>> CID 1425725:  Incorrect expression  (MIXED_ENUMS)
>>> Mixing enum types "FontLineStyle" and "FontWeight" for "m_nAttr".
258 aFormatAttr.m_nAttr = WEIGHT_BOLD;
259 aFormatAttr.m_nColor = COL_BLACK;
260 
261 Load();
262 }
263 

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



*** CID 1425724:  Incorrect expression  (MIXED_ENUMS)
/sw/source/uibase/config/modcfg.cxx: 255 in 
SwRevisionConfig::SwRevisionConfig()()
249 ConfigItemMode::DelayedUpdate|ConfigItemMode::ReleaseTree)
250 {
251 aInsertAttr.m_nItemId = SID_ATTR_CHAR_UNDERLINE;
252 aInsertAttr.m_nAttr = LINESTYLE_SINGLE;
253 aInsertAttr.m_nColor = COL_TRANSPARENT;
254 aDeletedAttr.m_nItemId = SID_ATTR_CHAR_STRIKEOUT;
>>> CID 1425724:  Incorrect expression  (MIXED_ENUMS)
>>> Mixing enum types "FontLineStyle" and "FontStrikeout" for "m_nAttr".
255 aDeletedAttr.m_nAttr = STRIKEOUT_SINGLE;
256 aDeletedAttr.m_nColor = COL_TRANSPARENT;
257 aFormatAttr.m_nItemId = SID_ATTR_CHAR_WEIGHT;
258 aFormatAttr.m_nAttr = WEIGHT_BOLD;
259 aFormatAttr.m_nColor = COL_BLACK;
260 

** CID 1425723:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/sc/source/filter/xml/xmlcondformat.cxx: 340 in 
ScXMLConditionalFormatContext::endFastElement(int)()



*** CID 1425723:  Memory - illegal accesses  (WRAPPER_ESCAPE)
/sc/source/filter/xml/xmlcondformat.cxx: 340 in 
ScXMLConditionalFormatContext::endFastElement(int)()
334 if (aCacheEntry.mnAge > nOldestAge)
335 {
336 nOldestAge = aCacheEntry.mnAge;
337 nIndexOfOldest = (&aCacheEntry - 
&mrParent.maCache.front());
338 }
339 }
>>> CID 1425723:  Memory - illegal accesses  (WRAPPER_ESCAPE)
>>> The internal representation of local "pFormat" escapes into 
>>> "this->mrParent.maCache[nIndexOfOldest].mpFormat", but is destroyed when it 
>>> exits scope.
340 mrParent.maCache[nIndexOfOldest].mpFormat = pFormat.get();
341 mrParent.maCache[nIndexOfOldest].mbSingleRelativeReference = 
bSingleRelativeReference;
342 mrParent.maCache[nIndexOfOldest].mpTokens.reset(pTokens);
343 mrParent.maCache[nIndexOfOldest].mnAge = 0;
344 }
345 



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpygVWKkSaWNlrIEDKn7TRhHPiZynzUYWzqxDsB0RAMNA43EGS3SV1G3Y027u7b0RMtw4s4m96fd4iurSGHLRE-2Faq1NoAPwKfy0bGqx7FL-2FsEjQwKq8cJJQkWQxEYxU9kBGvBKulw6u7UinLL6qh5dte5HvPPR5VZmlUy4ldJIpTfU-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-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpygVWKkSaWNlrIEDKn7TRhHFbcvhnUVKi91KPiJPKgnGk-2BB6O-2FQnU9go-2B5FJ4eQYowNKtS-2BuuNnlwHo2bKrVS16LV3ehetIf6awq6JCifJ5jw-2Fk4cM3tXMjp5SvSlQ-2BjcBtTz6s-2BPvgbssFuup22wLqwb65140RQ3mpzFazgT5hiA-3D

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

New Defects reported by Coverity Scan for LibreOffice

2017-12-15 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 1426171:(FORWARD_NULL)
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1916 in 
SwTiledRenderingTest::testDocumentRepair()()
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1917 in 
SwTiledRenderingTest::testDocumentRepair()()
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1932 in 
SwTiledRenderingTest::testDocumentRepair()()
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1933 in 
SwTiledRenderingTest::testDocumentRepair()()



*** CID 1426171:(FORWARD_NULL)
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1916 in 
SwTiledRenderingTest::testDocumentRepair()()
1910 std::unique_ptr pItem1;
1911 std::unique_ptr pItem2;
1912 
pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
1913 
pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
1914 CPPUNIT_ASSERT(dynamic_cast< const SfxBoolItem* 
>(pItem1.get()));
1915 CPPUNIT_ASSERT(dynamic_cast< const SfxBoolItem* 
>(pItem2.get()));
>>> CID 1426171:(FORWARD_NULL)
>>> Dynamic cast to pointer "dynamic_cast >> *>(pItem1.get())" can return "NULL".
1916 CPPUNIT_ASSERT_EQUAL(false, dynamic_cast< const SfxBoolItem* 
>(pItem1.get())->GetValue());
1917 CPPUNIT_ASSERT_EQUAL(false, dynamic_cast< const SfxBoolItem* 
>(pItem2.get())->GetValue());
1918 }
1919 
1920 // Insert a character in the second view.
1921 SfxLokHelper::setView(nView2);
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1917 in 
SwTiledRenderingTest::testDocumentRepair()()
1911 std::unique_ptr pItem2;
1912 
pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
1913 
pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
1914 CPPUNIT_ASSERT(dynamic_cast< const SfxBoolItem* 
>(pItem1.get()));
1915 CPPUNIT_ASSERT(dynamic_cast< const SfxBoolItem* 
>(pItem2.get()));
1916 CPPUNIT_ASSERT_EQUAL(false, dynamic_cast< const SfxBoolItem* 
>(pItem1.get())->GetValue());
>>> CID 1426171:(FORWARD_NULL)
>>> Dynamic cast to pointer "dynamic_cast >> *>(pItem2.get())" can return "NULL".
1917 CPPUNIT_ASSERT_EQUAL(false, dynamic_cast< const SfxBoolItem* 
>(pItem2.get())->GetValue());
1918 }
1919 
1920 // Insert a character in the second view.
1921 SfxLokHelper::setView(nView2);
1922 pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'u', 0);
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1932 in 
SwTiledRenderingTest::testDocumentRepair()()
1926 std::unique_ptr pItem1;
1927 std::unique_ptr pItem2;
1928 
pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
1929 
pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
1930 CPPUNIT_ASSERT(dynamic_cast< const SfxBoolItem* 
>(pItem1.get()));
1931 CPPUNIT_ASSERT(dynamic_cast< const SfxBoolItem* 
>(pItem2.get()));
>>> CID 1426171:(FORWARD_NULL)
>>> Dynamic cast to pointer "dynamic_cast >> *>(pItem1.get())" can return "NULL".
1932 CPPUNIT_ASSERT_EQUAL(true, dynamic_cast< const SfxBoolItem* 
>(pItem1.get())->GetValue());
1933 CPPUNIT_ASSERT_EQUAL(true, dynamic_cast< const SfxBoolItem* 
>(pItem2.get())->GetValue());
1934 }
1935 
1936 comphelper::LibreOfficeKit::setActive(false);
1937 }
/sw/qa/extras/tiledrendering/tiledrendering.cxx: 1933 in 
SwTiledRenderingTest::testDocumentRepair()()
1927 std::unique_ptr pItem2;
1928 
pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem1);
1929 
pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, pItem2);
1930 CPPUNIT_ASSERT(dynamic_cast< const SfxBoolItem* 
>(pItem1.get()));
1931 CPPUNIT_ASSERT(dynamic_cast< const SfxBoolItem* 
>(pItem2.get()));
1932 CPPUNIT_ASSERT_EQUAL(true, dynamic_cast< const SfxBoolItem* 
>(pItem1.get())->GetValue());
>>> CID 1426171:(FORWARD_NULL)
>>> Dynamic cast to pointer "dynamic_cast >> *>(pItem2.get())" can return "NULL".
1933 CPPUNIT_ASSERT_EQUAL(true, dynamic_cast< const SfxBoolItem* 
>(pItem2.get())->GetValue());
1934 }
1935 
1936 comphelper::LibreOfficeKit::setActive(false);
1937 }
1938 

** CID 1426170:(FORWARD_NULL)
/sc/qa/unit/tiledrendering/tiledrendering.cxx: 1449 in 
::S

New Defects reported by Coverity Scan for LibreOffice

2017-12-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.
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 1426315:  Control flow issues  (DEADCODE)
/sw/source/core/layout/flylay.cxx: 720 in SwFlyLayFrame::Modify(const 
SfxPoolItem *, const SfxPoolItem *)()



*** CID 1426315:  Control flow issues  (DEADCODE)
/sw/source/core/layout/flylay.cxx: 720 in SwFlyLayFrame::Modify(const 
SfxPoolItem *, const SfxPoolItem *)()
714 void SwFlyLayFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem 
*pNew )
715 {
716 const SwFormatAnchor *pAnch = nullptr;
717 
718 if (pNew)
719 {
>>> CID 1426315:  Control flow issues  (DEADCODE)
>>> Execution cannot reach the expression "0" inside this statement: 
>>> "nWhich = (pNew ? pNew->Whic...".
720 const sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
721 if( RES_ATTRSET_CHG == nWhich && SfxItemState::SET ==
722 static_cast(pNew)->GetChgSet()->GetItemState( RES_ANCHOR, false,
723 reinterpret_cast(&pAnch) ))
724 ; // GetItemState sets the anchor pointer!
725 

** CID 1426314:  Resource leaks  (RESOURCE_LEAK)
/vcl/unx/generic/plugadapt/salplug.cxx: 130 in tryInstance(const rtl::OUString 
&, bool)()



*** CID 1426314:  Resource leaks  (RESOURCE_LEAK)
/vcl/unx/generic/plugadapt/salplug.cxx: 130 in tryInstance(const rtl::OUString 
&, bool)()
124 }
125 else
126 {
127 SAL_INFO("vcl.plugadapt", "could not load shared object " << 
aModule);
128 }
129 
>>> CID 1426314:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "aMod" going out of scope leaks the storage it points to.
130 return pInst;
131 }
132 
133 #if !defined(ANDROID)
134 
135 namespace {

** CID 1426313:  Error handling issues  (CHECKED_RETURN)
/vcl/source/window/builder.cxx: 1645 in VclBuilder::makeObject(vcl::Window *, 
const rtl::OString &, const rtl::OString &, std::map, std::allocator>> &)()



*** CID 1426313:  Error handling issues  (CHECKED_RETURN)
/vcl/source/window/builder.cxx: 1645 in VclBuilder::makeObject(vcl::Window *, 
const rtl::OString &, const rtl::OString &, std::map, std::allocator>> &)()
1639 pModule->loadRelative(&thisModule, sMergedModule);
1640 if (!pModule->getFunctionSymbol(sFunction))
1641 {
1642 pModule->loadRelative(&thisModule, sModule);
1643 }
1644 #else
>>> CID 1426313:  Error handling issues  (CHECKED_RETURN)
>>> Calling "loadRelative" without checking return value (as is done 
>>> elsewhere 4 out of 5 times).
1645 pModule->loadRelative(&thisModule, sModule);
1646 #endif
1647 aI = m_aModuleMap.insert(std::make_pair(sModule, 
std::unique_ptr(pModule))).first;
1648 }
1649 customMakeWidget pFunction = 
reinterpret_cast(aI->second->getFunctionSymbol(sFunction));
1650 #else

** CID 1426312:  Error handling issues  (CHECKED_RETURN)
/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx: 600 in 
dp_gui::UpdateInstallDialog::Thread::download(const rtl::OUString &, 
dp_gui::UpdateData &)()



*** CID 1426312:  Error handling issues  (CHECKED_RETURN)
/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx: 600 in 
dp_gui::UpdateInstallDialog::Thread::download(const rtl::OUString &, 
dp_gui::UpdateData &)()
594 destFolder += "_";
595 
596 ::ucbhelper::Content destFolderContent;
597 dp_misc::create_folder( &destFolderContent, destFolder, 
m_updateCmdEnv.get() );
598 
599 ::ucbhelper::Content sourceContent;
>>> CID 1426312:  Error handling issues  (CHECKED_RETURN)
>>> Calling "create_ucb_content" without checking return value (as is done 
>>> elsewhere 5 out of 6 times).
600 dp_misc::create_ucb_content( &sourceContent, sDownloadURL, 
m_updateCmdEnv.get() );
601 
602 const OUString sTitle( StrTitle::getTitle( sourceContent ) );
603 
604 if (destFolderContent.transferContent(
605 sourceContent, ::ucbhelper::InsertOperation::Copy,



To view the

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(), &buf);
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(), &buf);
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(), &buf);
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(co

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 v

New Defects reported by Coverity Scan for LibreOffice

2017-11-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.
18 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 1422233:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/txtnode/thints.cxx: 1292 in SwTextNode::InsertHint(SwTextAttr 
*, SetAttrMode)()



*** CID 1422233:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/txtnode/thints.cxx: 1292 in SwTextNode::InsertHint(SwTextAttr 
*, SetAttrMode)()
1286 // Need to insert char first, because SetAnchor() 
reads
1287 // GetStart().
1288 //JP 11.05.98: if the anchor is already set 
correctly,
1289 // fix it after inserting the char, so that 
clients don't
1290 // have to worry about it.
1291 const SwFormatAnchor* pAnchor = nullptr;
>>> CID 1422233:  Error handling issues  (CHECKED_RETURN)
>>> Calling "GetItemState" without checking return value (as is done 
>>> elsewhere 71 out of 74 times).
1292 pFormat->GetItemState( RES_ANCHOR, false,
1293 reinterpret_cast(&pAnchor) );
1294 
1295 SwIndex aIdx( this, pAttr->GetStart() );
1296 const OUString c(GetCharOfTextAttr(*pAttr));
1297 OUString const ins( InsertText(c, aIdx, 
nInsertFlags) );

** CID 1422232:(NEGATIVE_RETURNS)
/sc/source/ui/unoobj/chart2uno.cxx: 756 in 
::Chart2Positioner::createPositionMap()()
/sc/source/ui/unoobj/chart2uno.cxx: 756 in 
::Chart2Positioner::createPositionMap()()
/sc/source/ui/unoobj/chart2uno.cxx: 756 in 
::Chart2Positioner::createPositionMap()()



*** CID 1422232:(NEGATIVE_RETURNS)
/sc/source/ui/unoobj/chart2uno.cxx: 756 in 
::Chart2Positioner::createPositionMap()()
750 (*pCols)[ nInsCol ] = pCol;
751 }
752 else
753 pCol = it->second;
754 
755 sal_uInt32 nInsRow = static_cast(bNoGlue ? 
nNoGlueRow : nRow1);
>>> CID 1422232:(NEGATIVE_RETURNS)
>>> Unsigned variable "nInsRow" is incremented, which might cause an 
>>> integer overflow.
756 for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow, 
++nInsRow)
757 {
758 ScSingleRefData aCellData;
759 aCellData.InitFlags();
760 aCellData.SetFlag3D(true);
761 aCellData.SetColRel(false);
/sc/source/ui/unoobj/chart2uno.cxx: 756 in 
::Chart2Positioner::createPositionMap()()
750 (*pCols)[ nInsCol ] = pCol;
751 }
752 else
753 pCol = it->second;
754 
755 sal_uInt32 nInsRow = static_cast(bNoGlue ? 
nNoGlueRow : nRow1);
>>> CID 1422232:(NEGATIVE_RETURNS)
>>> Unsigned variable "nInsRow" is incremented, which might cause an 
>>> integer overflow.
756 for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow, 
++nInsRow)
757 {
758 ScSingleRefData aCellData;
759 aCellData.InitFlags();
760 aCellData.SetFlag3D(true);
761 aCellData.SetColRel(false);
/sc/source/ui/unoobj/chart2uno.cxx: 756 in 
::Chart2Positioner::createPositionMap()()
750 (*pCols)[ nInsCol ] = pCol;
751 }
752 else
753 pCol = it->second;
754 
755 sal_uInt32 nInsRow = static_cast(bNoGlue ? 
nNoGlueRow : nRow1);
>>> CID 1422232:(NEGATIVE_RETURNS)
>>> Unsigned variable "nInsRow" is incremented, which might cause an 
>>> integer overflow.
756 for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow, 
++nInsRow)
757 {
758 ScSingleRefData aCellData;
759 aCellData.InitFlags();
760 aCellData.SetFlag3D(true);
761 aCellData.SetColRel(false);



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8a

New Defects reported by Coverity Scan for LibreOffice

2017-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.
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 1401344:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/7/bits/shared_ptr_base.h: 375 in 
std::_Sp_counted_ptr::_M_dispose()()



*** CID 1401344:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/7/bits/shared_ptr_base.h: 375 in 
std::_Sp_counted_ptr::_M_dispose()()
369 public:
370   explicit
371   _Sp_counted_ptr(_Ptr __p) noexcept
372   : _M_ptr(__p) { }
373 
374   virtual void
>>> CID 1401344:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::DeploymentException" 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().
375   _M_dispose() noexcept
376   { delete _M_ptr; }
377 
378   virtual void
379   _M_destroy() noexcept
380   { delete this; }



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyqm-2BPyB9atMFKJ1KqKFTtUxUvFX9eoB51-2FtHTFv-2B6uEPzkBHdOQgVGN2qkgxuwqJUN1BTYHkvXqZP3T0KaIk61YsAXkXolnCBPMhVFYr9VOEYAlpiZTk0-2FjktQKjQ6S3z098afMvG4BMqVTs5b7fz9rWiPi1A5l2JBrvhxtFIZds-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-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyqm-2BPyB9atMFKJ1KqKFTtU4p8U3aPJLQtzqLS1ZugLNwqsz5mDknqY2SJFxp44bLgEH4MNABkWfaNRmveG7TdzX7zOCO8X7w3gLsghWRB-2B2HwAwbguTlgHpt10-2FZRYTSKojXd53XwBeTGB-2BTTMKzLfLbqdHbaJosV-2Bwq9rys25eU-3D

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


New Defects reported by Coverity Scan for LibreOffice

2017-11-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.
21 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 1423309:  Error handling issues  (UNCAUGHT_EXCEPT)
/sd/source/ui/unoidl/SdUnoDrawView.cxx: 95 in 
sd::SdUnoDrawView::getActiveLayer()()



*** CID 1423309:  Error handling issues  (UNCAUGHT_EXCEPT)
/sd/source/ui/unoidl/SdUnoDrawView.cxx: 95 in 
sd::SdUnoDrawView::getActiveLayer()()
89 mrDrawViewShell.ChangeEditMode (
90 mrDrawViewShell.GetEditMode(),
91 bLayerMode);
92 }
93 }
94 
>>> CID 1423309:  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().
95 Reference SdUnoDrawView::getActiveLayer() throw ()
96 {
97 Reference xCurrentLayer;
98 
99 do
100 {



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyCUHqvh-2F4bYa-2BfV9m86WqrQgdp8cEgI-2FpmJ4QclW3n-2BIOTQ9woZZynnTNobrko1kTVe3O45n61MQ-2FlsN9ZdeF5ZGn5JVn3D1x5k99aiiXqxvjwNjZAcAvT2-2F7Bgn-2BytwKT1LAN0phmWim5ixDRlbLwtNxTMCjbhj4h6zfcouAhxg-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-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyCUHqvh-2F4bYa-2BfV9m86WqrUfrjrPmpXtojMrhkdgmHAIWCbDIq8bpUQwD2kT58S7YccfW9jXghYKOicM45kMhVtM9A1FXlvrRvQfyuoalDn2iYyafBfSrFrW4g86sWAhvqimjlne616-2FmYF2w9518fPXFxr3RSoLfJwU-2Bvc-2Fyz7g-3D

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


New Defects reported by Coverity Scan for LibreOffice

2017-11-27 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.
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 10 of 10 defect(s)


** CID 1424266:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/7/bits/unique_ptr.h: 264 in 
std::unique_ptr>::~unique_ptr()()



*** CID 1424266:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/7/bits/unique_ptr.h: 264 in 
std::unique_ptr>::~unique_ptr()()
258   template, is_same<_Dp, 
default_delete<_Tp
260 unique_ptr(auto_ptr<_Up>&& __u) noexcept;
261 #endif
262 
263   /// Destructor, invokes the deleter if the stored pointer is not 
null.
>>> CID 1424266:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::bad_weak_ptr" 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().
264   ~unique_ptr() noexcept
265   {
266 auto& __ptr = _M_t._M_ptr();
267 if (__ptr != nullptr)
268   get_deleter()(__ptr);
269 __ptr = pointer();

** CID 1424265:  Parse warnings  (PARSE_ERROR)
/sc/source/ui/miscdlgs/dataproviderdlg.cxx: 223 in ()



*** CID 1424265:  Parse warnings  (PARSE_ERROR)
/sc/source/ui/miscdlgs/dataproviderdlg.cxx: 223 in ()
217 { 1, "Cancel & Quit", &ScDataProviderDlg::cancelAndQuit }
218 };
219 
220 MenuData aColumnData[] = {
221 { 0, "Delete Column", &ScDataProviderDlg::deleteColumn },
222 { 1, "Split Column", &ScDataProviderDlg::splitColumn },
>>> CID 1424265:  Parse warnings  (PARSE_ERROR)
>>> no suitable constructor exists to convert from "void 
>>> (ScDataProviderDlg::*)()" to "std::function"
223 { 2, "Merge Columns", &ScDataProviderDlg::mergeColumns },
224 };
225 
226 class ScDataTransformationBaseControl : public VclContainer,
227 public VclBuilderContainer
228 {

** CID 1424264:  Parse warnings  (PARSE_ERROR)
/sc/source/ui/miscdlgs/dataproviderdlg.cxx: 217 in ()



*** CID 1424264:  Parse warnings  (PARSE_ERROR)
/sc/source/ui/miscdlgs/dataproviderdlg.cxx: 217 in ()
211 const char* aMenuName;
212 std::function maCallback;
213 };
214 
215 MenuData aStartData[] = {
216 { 0, "Apply & Quit", &ScDataProviderDlg::applyAndQuit },
>>> CID 1424264:  Parse warnings  (PARSE_ERROR)
>>> no suitable constructor exists to convert from "void 
>>> (ScDataProviderDlg::*)()" to "std::function"
217 { 1, "Cancel & Quit", &ScDataProviderDlg::cancelAndQuit }
218 };
219 
220 MenuData aColumnData[] = {
221 { 0, "Delete Column", &ScDataProviderDlg::deleteColumn },
222 { 1, "Split Column", &ScDataProviderDlg::splitColumn },

** CID 1424263:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/7/bits/unique_ptr.h: 371 in 
std::unique_ptr>::reset(sd::ViewShell::Implementation
 *)()



*** CID 1424263:  Error handling issues  (UNCAUGHT_EXCEPT)
/usr/include/c++/7/bits/unique_ptr.h: 371 in 
std::unique_ptr>::reset(sd::ViewShell::Implementation
 *)()
365*
366* @param __p  The new pointer to store.
367*
368* The deleter will be invoked if a pointer is already owned.
369*/
370   void
>>> CID 1424263:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "std::bad_weak_ptr" 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().
371   reset(pointer __p = pointer()) noexcept
372   {
373 using std::swap;
374 swap(_M_t._M_ptr(), __p);
375 if (__p != pointer())
376   get_deleter()(__p);

** CID 1424262:  Parse warnings  (PARSE_ERROR)
/sc/source/ui/miscdlgs/dataproviderdlg.cxx: 221 in ()



*** CID 1424262:  Parse warnings  (PARSE_ERROR)
/sc/source/ui/miscdlgs/dataproviderdlg.cxx: 221 in ()
215 MenuData aStartData[] = {
216 { 0, "Apply & Quit", &ScDataProviderDlg::applyAndQuit },
217 { 1, "Cancel & Quit", &ScDataProviderDlg::cancelAndQuit }
218 };
219 
220 Men

New Defects reported by Coverity Scan for LibreOffice

2017-11-29 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.
24 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 1424325:  Uninitialized members  (UNINIT_CTOR)
/svx/source/svdraw/svdograf.cxx: 378 in SdrGrafObj::SdrGrafObj(const Graphic &, 
const tools::Rectangle &)()



*** CID 1424325:  Uninitialized members  (UNINIT_CTOR)
/svx/source/svdraw/svdograf.cxx: 378 in SdrGrafObj::SdrGrafObj(const Graphic &, 
const tools::Rectangle &)()
372 mbLineIsOutsideGeometry = true;
373 mbInsidePaint = false;
374 mbIsPreview = false;
375 
376 // #i25616#
377 mbSupportTextIndentingOnLineWidthChange = false;
>>> CID 1424325:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mbIsSignatureLineCanAddComment" is not 
>>> initialized in this constructor nor in any functions that it calls.
378 }
379 
380 SdrGrafObj::SdrGrafObj( const Graphic& rGrf )
381 :   SdrRectObj(),
382 pGraphicLink( nullptr ),
383 bMirrored   ( false )

** CID 1424324:(UNCAUGHT_EXCEPT)
/editeng/source/uno/unonrule.cxx: 476 in SvxCreateNumRule(const SvxNumRule *)()
/editeng/source/uno/unonrule.cxx: 476 in SvxCreateNumRule(const SvxNumRule *)()



*** CID 1424324:(UNCAUGHT_EXCEPT)
/editeng/source/uno/unonrule.cxx: 476 in SvxCreateNumRule(const SvxNumRule *)()
470 if( pRule == nullptr )
471 throw IllegalArgumentException();
472 
473 return pRule->getNumRule();
474 }
475 
>>> CID 1424324:(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().
476 css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule( 
const SvxNumRule* pRule ) throw()
477 {
478 DBG_ASSERT( pRule, "No default SvxNumRule!" );
479 if( pRule )
480 {
481 return new SvxUnoNumberingRules( *pRule );
/editeng/source/uno/unonrule.cxx: 476 in SvxCreateNumRule(const SvxNumRule *)()
470 if( pRule == nullptr )
471 throw IllegalArgumentException();
472 
473 return pRule->getNumRule();
474 }
475 
>>> CID 1424324:(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().
476 css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule( 
const SvxNumRule* pRule ) throw()
477 {
478 DBG_ASSERT( pRule, "No default SvxNumRule!" );
479 if( pRule )
480 {
481 return new SvxUnoNumberingRules( *pRule );

** CID 1424323:  Uninitialized members  (UNINIT_CTOR)
/svx/source/svdraw/svdograf.cxx: 402 in SdrGrafObj::SdrGrafObj(const Graphic 
&)()



*** CID 1424323:  Uninitialized members  (UNINIT_CTOR)
/svx/source/svdraw/svdograf.cxx: 402 in SdrGrafObj::SdrGrafObj(const Graphic 
&)()
396 mbLineIsOutsideGeometry = true;
397 mbInsidePaint = false;
398 mbIsPreview = false;
399 
400 // #i25616#
401 mbSupportTextIndentingOnLineWidthChange = false;
>>> CID 1424323:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mbIsSignatureLineCanAddComment" is not 
>>> initialized in this constructor nor in any functions that it calls.
402 }
403 
404 SdrGrafObj::~SdrGrafObj()
405 {
406 delete pGraphic;
407 delete mpReplacementGraphic;

** CID 1424322:  Uninitialized members  (UNINIT_CTOR)
/oox/source/vml/vmlshape.cxx: 260 in oox::vml::ShapeModel::ShapeModel()()



*** CID 1424322:  Uninitialized members  (UNINIT_CTOR)
/oox/source/vml/vmlshape.cxx: 260 in oox::vml::ShapeModel::ShapeModel()()
254 {
255 }
256 
257 ShapeModel::ShapeModel() :
258 mbIsSignatureLine(false)
259 {
>>> CID 1424322:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "mbSignatureLineCanAddComment" is not 
>>> initialized in this constructor nor in any functions that it calls.
260 }
261 
262 ShapeModel::~ShapeModel()
263 {
264 }
265 

** CID 1424321:  Null pointer derefe

New Defects reported by Coverity Scan for LibreOffice

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


** CID 1424880:(UNCAUGHT_EXCEPT)
/svx/source/unodraw/unomod.cxx: 690 in SvxCreateNumRule(SdrModel *)()
/svx/source/unodraw/unomod.cxx: 690 in SvxCreateNumRule(SdrModel *)()



*** CID 1424880:(UNCAUGHT_EXCEPT)
/svx/source/unodraw/unomod.cxx: 690 in SvxCreateNumRule(SdrModel *)()
684 {
685 OUString aService( "com.sun.star.drawing.DrawPages" );
686 uno::Sequence< OUString > aSeq( &aService, 1 );
687 return aSeq;
688 }
689 
>>> CID 1424880:(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().
690 css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule( 
SdrModel* pModel ) throw()
691 {
692 const SvxNumRule* pDefaultRule = nullptr;
693 if( pModel )
694 {
695 const SvxNumBulletItem* pItem = 
pModel->GetItemPool().GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET);
/svx/source/unodraw/unomod.cxx: 690 in SvxCreateNumRule(SdrModel *)()
684 {
685 OUString aService( "com.sun.star.drawing.DrawPages" );
686 uno::Sequence< OUString > aSeq( &aService, 1 );
687 return aSeq;
688 }
689 
>>> CID 1424880:(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().
690 css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule( 
SdrModel* pModel ) throw()
691 {
692 const SvxNumRule* pDefaultRule = nullptr;
693 if( pModel )
694 {
695 const SvxNumBulletItem* pItem = 
pModel->GetItemPool().GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET);



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyCsxuTVTf6JjzjKL0D6zBFXLrFZmb1jsbYVTC3Y5FgQMgW-2BLqhyzscTchRKk9bFcCL4C7tLuAq64nlrF-2BVoVWZEkV-2BhaYODHCMvkZNGiaKtdcwNrrbFiUWYTSeLod-2BV-2FAk9ds1d1RUOIjhn6zPolJuXvo0Tstmxdlxoo0vkGUSN0-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-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyCsxuTVTf6JjzjKL0D6zBFUUkBiifps1rkcExAHFnCbC-2FaZm77-2F2a-2FtOgWWutt1iDyJOmOE6w2-2Bx6xh96N4n2fJ0ONNZ2pbpBytXVG9FynM-2B7KyCfpzq2kk-2B7AoYCTl40af8LRqD1ZwBACyWkknZimvFmni7ob-2BfYNeSiCv-2FX270-3D

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


New Defects reported by Coverity Scan for LibreOffice

2017-12-02 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 1424910:  Error handling issues  (UNCAUGHT_EXCEPT)
/editeng/source/uno/unotext2.cxx: 378 in 
SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration(const SvxUnoTextBase &, 
int, const ESelection &)()



*** CID 1424910:  Error handling issues  (UNCAUGHT_EXCEPT)
/editeng/source/uno/unotext2.cxx: 378 in 
SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration(const SvxUnoTextBase &, 
int, const ESelection &)()
372 }
373 
374 
375 //  class SvxUnoTextRangeEnumeration
376 
377 
>>> CID 1424910:  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().
378 SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration( const 
SvxUnoTextBase& rText, sal_Int32 nPara, const ESelection& rSel ) throw()
379 :   mxParentText(  const_cast(&rText) ),
380 mrParentText( rText ),
381 mnParagraph( nPara ),
382 mnNextPortion( 0 ),
383 mnSel( rSel )

** CID 1424909:  Error handling issues  (UNCAUGHT_EXCEPT)
/sd/source/ui/unoidl/unosrch.cxx: 444 in SdUnoSearchReplaceShape::Search(const 
com::sun::star::uno::Reference &, 
SdUnoSearchReplaceDescriptor *)()



*** CID 1424909:  Error handling issues  (UNCAUGHT_EXCEPT)
/sd/source/ui/unoidl/unosrch.cxx: 444 in SdUnoSearchReplaceShape::Search(const 
com::sun::star::uno::Reference &, 
SdUnoSearchReplaceDescriptor *)()
438 }
439 }
440 
441 return xFound;
442 }
443 
>>> CID 1424909:  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().
444 uno::Reference< text::XTextRange >  SdUnoSearchReplaceShape::Search( 
const uno::Reference< text::XTextRange >&  xText, SdUnoSearchReplaceDescriptor* 
pDescr ) throw()
445 {
446 if(!xText.is())
447 return uno::Reference< text::XTextRange > ();
448 
449 uno::Reference< text::XText > xParent( xText->getText() );



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyZIrWGlkG2EmM0G4ZOzbXTB-2FdWm4I2H4TVEhLEpQIysMguRptRh4-2BDIGH8mVdRokjyf35QmdEQZgAy5ZmB-2BuWWrnD3HDIZq1oIlkipkluARRH4goLwSTEQL8zs-2BFkJCuEwkaEf0YC-2BRAqdRUySEQ3Cexb-2BOwxpYRH2v3naLJdtuU-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-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyZIrWGlkG2EmM0G4ZOzbXTAB6DDmR1OOEsf5RFKYKuQlhqMggsR29WYWochYrIl1xsQMD6D1HKp267zi7uXnBlVOF8Y0xcK6BF3VRs2cOyg4Cu2v3HFOvaVp1-2BYw0LVzaSApES5Fql-2BGABJH75eJoUOWN6uUKD-2BcuXw-2BNS0MFgZs-3D

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


New Defects reported by Coverity Scan for LibreOffice

2018-05-15 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 1435605:  Error handling issues  (CHECKED_RETURN)
/vcl/source/control/field2.cxx: 2517 in TimeFormatter::Reformat()()



*** CID 1435605:  Error handling issues  (CHECKED_RETURN)
/vcl/source/control/field2.cxx: 2517 in TimeFormatter::Reformat()()
2511 if ( !bOK )
2512 return;
2513 
2514 if ( !aStr.isEmpty() )
2515 {
2516 ImplSetText( aStr );
>>> CID 1435605:  Error handling issues  (CHECKED_RETURN)
>>> Calling "TextToTime" without checking return value (as is done 
>>> elsewhere 4 out of 5 times).
2517 TextToTime( aStr, maLastTime, GetFormat(), IsDuration(), 
ImplGetLocaleDataWrapper() );
2518 }
2519 else
2520 SetTime( maLastTime );
2521 }
2522 



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpynDFdIcUfUswokbyAGcbF-2FWDngPYX6n0Nm8gsqGdPqHR8Px2hpxiGMBNE3k3rKCe8r3ElG7a5qYuOjB9JWwiFcobp5NL6FygSaUmMM-2FCwxlhllp5X8lBTvicA-2BznfCGEYVIeb4KjJUp37DQuv7G7vO2MZOBIjSHlwElWNq-2FZajZo-3D

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


New Defects reported by Coverity Scan for LibreOffice

2018-05-19 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 1435686:  Incorrect expression  (COPY_PASTE_ERROR)
/svx/source/xoutdev/_xoutbmp.cxx: 594 in XOutBitmap::GetContour(const Bitmap &, 
XOutFlags, const tools::Rectangle *)()



*** CID 1435686:  Incorrect expression  (COPY_PASTE_ERROR)
/svx/source/xoutdev/_xoutbmp.cxx: 594 in XOutBitmap::GetContour(const Bitmap &, 
XOutFlags, const tools::Rectangle *)()
588 pPoints1[ nPolyPos ] = Point( nX, nY );
589 nY = nStartY2;
590 
591 // this loop always breaks eventually as 
there is at least one pixel
592 while( true )
593 {
>>> CID 1435686:  Incorrect expression  (COPY_PASTE_ERROR)
>>> "nX" in "pAcc->GetPixelFromData(pScanline, nX)" looks like a copy-paste 
>>> error.
594 if( aBlack == pAcc->GetPixelFromData( 
pScanline, nX ) )
595 {
596 pPoints2[ nPolyPos ] = Point( nX, 
nY );
597 break;
598 }
599 

** CID 1435685:(CHECKED_RETURN)
/basegfx/test/genericclipper.cxx: 136 in 
basegfx2d::genericclipper::validateCrossover(const char *, const char *, const 
char *) const()
/basegfx/test/genericclipper.cxx: 137 in 
basegfx2d::genericclipper::validateCrossover(const char *, const char *, const 
char *) const()



*** CID 1435685:(CHECKED_RETURN)
/basegfx/test/genericclipper.cxx: 136 in 
basegfx2d::genericclipper::validateCrossover(const char *, const char *, const 
char *) const()
130const char* pValidSvgD) const
131 {
132 OUString aInput=OUString::createFromAscii(pInputSvgD);
133 OUString aValid=OUString::createFromAscii(pValidSvgD);
134 B2DPolyPolygon aInputPoly, aValidPoly;
135 
>>> CID 1435685:(CHECKED_RETURN)
>>> Calling "importFromSvgD" without checking return value (as is done 
>>> elsewhere 20 out of 25 times).
136 utils::importFromSvgD(aInputPoly, aInput, false, nullptr);
137 utils::importFromSvgD(aValidPoly, aValid, false, nullptr);
138 
139 CPPUNIT_ASSERT_EQUAL_MESSAGE(
140 pName,
141 aValid,
/basegfx/test/genericclipper.cxx: 137 in 
basegfx2d::genericclipper::validateCrossover(const char *, const char *, const 
char *) const()
131 {
132 OUString aInput=OUString::createFromAscii(pInputSvgD);
133 OUString aValid=OUString::createFromAscii(pValidSvgD);
134 B2DPolyPolygon aInputPoly, aValidPoly;
135 
136 utils::importFromSvgD(aInputPoly, aInput, false, nullptr);
>>> CID 1435685:(CHECKED_RETURN)
>>> Calling "importFromSvgD" without checking return value (as is done 
>>> elsewhere 20 out of 25 times).
137 utils::importFromSvgD(aValidPoly, aValid, false, nullptr);
138 
139 CPPUNIT_ASSERT_EQUAL_MESSAGE(
140 pName,
141 aValid,
142 basegfx::utils::exportToSvgD(

** CID 1435684:  Possible Control flow issues  (DEADCODE)
/cui/source/dialogs/SignSignatureLineDialog.cxx: 155 in 
SignSignatureLineDialog::Apply()()



*** CID 1435684:  Possible Control flow issues  (DEADCODE)
/cui/source/dialogs/SignSignatureLineDialog.cxx: 155 in 
SignSignatureLineDialog::Apply()()
149 
150 bool bSuccess = false; // TODO
151 
152 if (bSuccess)
153 {
154 // Read svg and replace placeholder texts
>>> CID 1435684:  Possible Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "aSvgImage = this->getSignat...".
155 OUString aSvgImage(getSignatureImage());
156 aSvgImage = aSvgImage.replaceAll("[SIGNER_NAME]", 
getCDataString(m_aSuggestedSignerName));
157 aSvgImage = aSvgImage.replaceAll("[SIGNER_TITLE]", 
getCDataString(m_aSuggestedSignerTitle));
158 
159 aSvgImage = aSvgImage.replaceAll("[SIGNATURE]", 
getCDataString(m_xEditName->get_text()));
160 OUString aIssuerLine = 
CuiResId(RID_SVXSTR_SIGNATURELINE_SIGNED_BY)

** CID 1435683:  Error handling issues  (CHECKED_RETURN)
/basegfx/

New Defects reported by Coverity Scan for LibreOffice

2018-05-23 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 1435749:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/unocore/unoobj2.cxx: 301 in 
UnoActionRemoveContext::~UnoActionRemoveContext()()



*** CID 1435749:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/unocore/unoobj2.cxx: 301 in 
UnoActionRemoveContext::~UnoActionRemoveContext()()
295 if (m_pDoc)
296 {
297 lcl_RemoveImpl(m_pDoc);
298 }
299 }
300 
>>> CID 1435749:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::DeploymentException" 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().
301 UnoActionRemoveContext::~UnoActionRemoveContext()
302 {
303 if (m_pDoc)
304 {
305 SwRootFrame *const pRootFrame = 
m_pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
306 if (pRootFrame)

** CID 1435748:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/crsr/crstrvl.cxx: 995 in SwCursorShell::GotoPrevOutline()()



*** CID 1435748:  Error handling issues  (CHECKED_RETURN)
/sw/source/core/crsr/crstrvl.cxx: 995 in SwCursorShell::GotoPrevOutline()()
989 }
990 
991 SwCursor* pCursor = getShellCursor( true );
992 SwNode* pNd = &(pCursor->GetNode());
993 SwOutlineNodes::size_type nPos;
994 bool bRet = false;
>>> CID 1435748:  Error handling issues  (CHECKED_RETURN)
>>> Calling "Seek_Entry" without checking return value (as is done 
>>> elsewhere 13 out of 14 times).
995 rNds.GetOutLineNds().Seek_Entry(pNd, &nPos);
996 if ( nPos == 0 )
997 {
998 nPos = rNds.GetOutLineNds().size();
999 SvxSearchDialogWrapper::SetSearchLabel( 
SearchLabel::StartWrapped );
1000 }

** CID 1399120:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/crsr/callnk.cxx: 99 in SwCallLink::~SwCallLink()()



*** CID 1399120:  Error handling issues  (UNCAUGHT_EXCEPT)
/sw/source/core/crsr/callnk.cxx: 99 in SwCallLink::~SwCallLink()()
93 return;
94 }
95 }
96 }
97 }
98 
>>> CID 1399120:  Error handling issues  (UNCAUGHT_EXCEPT)
>>> An exception of type "com::sun::star::uno::DeploymentException" 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().
99 SwCallLink::~SwCallLink()
100 {
101 if( nNdTyp == SwNodeType::NONE || !rShell.m_bCallChgLnk ) // see 
ctor
102 return ;
103 
104 // If travelling over Nodes check formats and register them anew at 
the



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy8xGl5gyG72PKEYksHTP-2BsN-2Fl4tx2dJYI9r1wBExVlY0fdiopRQPS17y51av41VL5KvO9Gw4yxbfkjSZ3rF9AdRnZEST-2Fjm61RX-2F95yJOA9Fiuikt0WsxaWcabmPiXv6vlAKrMx8lCjFZfBBmsc5YDw5625lPLlbO26TNKRAWq-2Fo-3D

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


New Defects reported by Coverity Scan for LibreOffice

2018-05-27 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.
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 4 of 4 defect(s)


** CID 1435839:  Uninitialized members  (UNINIT_CTOR)
/include/vcl/customweld.hxx: 21 in 
weld::CustomWidgetController::CustomWidgetController()()



*** CID 1435839:  Uninitialized members  (UNINIT_CTOR)
/include/vcl/customweld.hxx: 21 in 
weld::CustomWidgetController::CustomWidgetController()()
15 namespace weld
16 {
17 class VCL_DLLPUBLIC CustomWidgetController
18 {
19 private:
20 Size m_aSize;
>>> CID 1435839:  Uninitialized members  (UNINIT_CTOR)
>>> The compiler-generated constructor for this class does not initialize 
>>> "m_pDrawingArea".
21 weld::DrawingArea* m_pDrawingArea;
22 
23 public:
24 virtual void Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect) = 0;
25 virtual void Resize() {}
26 virtual void MouseButtonDown(const MouseEvent&) {}

** CID 1435838:  Uninitialized members  (UNINIT_CTOR)
/svx/source/dialog/dlgctrl.cxx: 664 in RectCtl::RectCtl(SvxTabPage *, 
RectPoint, unsigned short, unsigned short)()



*** CID 1435838:  Uninitialized members  (UNINIT_CTOR)
/svx/source/dialog/dlgctrl.cxx: 664 in RectCtl::RectCtl(SvxTabPage *, 
RectPoint, unsigned short, unsigned short)()
658 , 
nRadius(Application::GetDefaultDevice()->LogicToPixel(Size(nCircle, 0), 
MapMode(MapUnit::Map100thMM)).Width())
659 , eDefRP(eRpt)
660 , pBitmap(nullptr)
661 , m_nState(CTL_STATE::NONE)
662 , mbCompleteDisable(false)
663 {
>>> CID 1435838:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "eRP" is not initialized in this constructor 
>>> nor in any functions that it calls.
664 }
665 
666 void RectCtl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
667 {
668 
pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 25,
669pDrawingArea->get_text_height() * 5);

** CID 1435837:  Uninitialized members  (UNINIT_CTOR)
/svx/source/dialog/charmap.cxx: 80 in 
SvxShowCharSet::SvxShowCharSet(weld::ScrolledWindow *, const 
VclPtr &)()



*** CID 1435837:  Uninitialized members  (UNINIT_CTOR)
/svx/source/dialog/charmap.cxx: 80 in 
SvxShowCharSet::SvxShowCharSet(weld::ScrolledWindow *, const 
VclPtr &)()
74 , mbUpdateForeground(true)
75 , mbUpdateBackground(true)
76 {
77 init();
78 
79 mxScrollArea->set_user_managed_scrolling();
>>> CID 1435837:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "nY" is not initialized in this constructor nor 
>>> in any functions that it calls.
80 }
81 
82 void SvxShowCharSet::SetDrawingArea(weld::DrawingArea* pDrawingArea)
83 {
84 mxScrollArea->set_size_request(COLUMN_COUNT * 
pDrawingArea->get_approximate_digit_width() * 4,
85ROW_COUNT * 
pDrawingArea->get_text_height() * 2);

** CID 1078573:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1078573:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/docnode/swbaslnk.cxx: 174 in SwBaseLink::DataChanged(const 
rtl::OUString &, const com::sun::star::uno::Any &)()
168 
169 if ( !bUpdate || bFrameInPaint )
170 return SUCCESS;
171 
172 if (bUpdate)
173 {
>>> CID 1078573:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pSwGrfNode" to "SetGrfFlySize", which 
>>> dereferences it.
174 if (!SetGrfFlySize(aGrfSz, pSwGrfNode, aOldSz))
175 {
176 SwMsgPoolItem aMsgHint(RES_GRAPHIC_ARRIVED);
177 lcl_CallModify(*pSwGrfNode, aMsgHint);
178 return SUCCESS;
179 }



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyfkkL4Gt7-2FUAdkX0ztjdcak8JQiLFHnf3ix4SoCLXG6ey-2F-2FFo-2BvxiztvRn-2BcMjd8TlAq5G6BfaMDbsJATMEofsoNoCLw9StlDKOAxdNTFHtZG83rh

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 &aLineColor,
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)
/drawi

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, &aArg.pData );
94 OUString aNum;
95 if ( aArg.startsWithIgnoreAsciiCase("--splash-pipe=", &aNum) )
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-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-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-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 [&rNd](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-06-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.
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 4 of 4 defect(s)


** CID 1437410:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1437410:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/docnode/ndtbl1.cxx: 93 in 
SwTableFormatCmp::~SwTableFormatCmp()()
87 }
88 
89 SwTableFormatCmp::~SwTableFormatCmp()
90 {
91 if (pOld)
92 pOld->Remove(this);
>>> CID 1437410:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "this->pOld" to "HasWriterListeners", which 
>>> dereferences it.
93 if (!pOld->HasWriterListeners())
94 delete pOld;
95 }
96 
97 // static
98 SwFrameFormat* 
SwTableFormatCmp::FindNewFormat(std::vector>& 
rArr,

** CID 1437409:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1437409:  Null pointer dereferences  (FORWARD_NULL)
/sw/qa/extras/ww8export/ww8export2.cxx: 311 in testTdf70838::verify()()
305 CPPUNIT_ASSERT(xText->getSize().Width  > 11000);
306 }
307 
308 DECLARE_WW8EXPORT_TEST(testTdf70838, "tdf70838.odt")
309 {
310 SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
>>> CID 1437409:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pTextDoc" to "GetDocShell", which dereferences it.
311 SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
312 SdrPage* pPage = 
pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
313 tools::Rectangle aRect = pPage->GetObj(0)->GetSnapRect();
314 CPPUNIT_ASSERT( aRect.GetHeight() > aRect.GetWidth() );
315 }
316 

** CID 1437408:  Uninitialized members  (UNINIT_CTOR)
/svx/source/dialog/paraprev.cxx: 221 in ParaPrevWindow::ParaPrevWindow()()



*** CID 1437408:  Uninitialized members  (UNINIT_CTOR)
/svx/source/dialog/paraprev.cxx: 221 in ParaPrevWindow::ParaPrevWindow()()
215 nLeftMargin ( 0 ),
216 nRightMargin( 0 ),
217 eAdjust ( SvxAdjust::Left ),
218 eLastLine   ( SvxAdjust::Left )
219 {
220 aSize = Size(11905, 16837);
>>> CID 1437408:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "eLine" is not initialized in this constructor 
>>> nor in any functions that it calls.
221 }
222 
223 void ParaPrevWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
224 {
225 Size 
aOptimalSize(getParagraphPreviewOptimalSize(pDrawingArea->get_ref_device()));
226 pDrawingArea->set_size_request(aOptimalSize.Width(), 
aOptimalSize.Height());

** CID 1437407:  FindBugs: Malicious code vulnerability  
(FB.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED)
/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java: 
48 in 
com.sun.star.script.framework.provider.ClassLoaderFactory.getURLClassLoader(java.lang.ClassLoader,
 java.net.URL[])()



*** CID 1437407:  FindBugs: Malicious code vulnerability  
(FB.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED)
/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java: 
48 in 
com.sun.star.script.framework.provider.ClassLoaderFactory.getURLClassLoader(java.lang.ClassLoader,
 java.net.URL[])()
42 
43 return getURLClassLoader(parent, classPath);
44 }
45 
46 public static ClassLoader getURLClassLoader(ClassLoader parent,
47 URL[] classpath) {
>>> CID 1437407:  FindBugs: Malicious code vulnerability  
>>> (FB.DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED)
>>> 
>>> com.sun.star.script.framework.provider.ClassLoaderFactory.getURLClassLoader(ClassLoader,
>>>  URL[]) creates a java.net.URLClassLoader classloader, which should be 
>>> performed within a doPrivileged block.
48 return new URLClassLoader(classpath, parent);
49 }



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyNgRalQv3-2FPxLwxoPwdptXUkrgux6lWK0ySo6MMNEMfyGqRgmlJgXMUazIz9n8K0ijKKqkJnThuSiipn71UXVFr-2FeRe

New Defects reported by Coverity Scan for LibreOffice

2018-06-25 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 1437527:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1437527:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/utlui/content.cxx: 695 in SwContentType::FillMemberList(bool 
*)()
689 if(nullptr != pbLevelOrVisibilityChanged)
690 {
691 // need to check visibility (and equal entry 
number) after
692 // creation due to a sorted list being used here 
(before,
693 // entries with same index were compared already at 
creation
694 // time what worked before a sorted list was used)
>>> CID 1437527:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing null pointer "pOldMember" to "checkVisibilityChanged", which 
>>> dereferences it.
695 *pbLevelOrVisibilityChanged = 
checkVisibilityChanged(
696 *pOldMember,
697 *pMember);
698 }
699 }
700 nMemberCount = pMember->size();

** CID 1437526:  Error handling issues  (CHECKED_RETURN)
/sc/source/filter/excel/xipivot.cxx: 1488 in XclImpPivotTable::Convert()()



*** CID 1437526:  Error handling issues  (CHECKED_RETURN)
/sc/source/filter/excel/xipivot.cxx: 1488 in XclImpPivotTable::Convert()()
1482 
1483 pDPObj->SetSaveData( aSaveData );
1484 pDPObj->SetSheetDesc( aDesc );
1485 pDPObj->SetOutRange( aOutRange );
1486 pDPObj->SetHeaderLayout( maPTViewEx9Info.mnGridLayout == 0 );
1487 
>>> CID 1437526:  Error handling issues  (CHECKED_RETURN)
>>> Calling "InsertNewTable" without checking return value (as is done 
>>> elsewhere 24 out of 27 times).
1488 GetDoc().GetDPCollection()->InsertNewTable(pDPObj);
1489 mpDPObj = pDPObj;
1490 
1491 ApplyFieldInfo();
1492 ApplyMergeFlags(aOutRange, aSaveData);
1493 }

** CID 1209000:  Error handling issues  (CHECKED_RETURN)
/sc/qa/unit/ucalc_pivottable.cxx: 270 in Test::testPivotTable()()



*** CID 1209000:  Error handling issues  (CHECKED_RETURN)
/sc/qa/unit/ucalc_pivottable.cxx: 270 in Test::testPivotTable()()
264 printRange(m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), "Data 
sheet content (modified)");
265 
266 // Now, create a copy of the datapilot object for the updated 
table, but
267 // don't reload the cache which should force the copy to use the 
old data
268 // from the cache.
269 ScDPObject* pDPObj2 = new ScDPObject(*pDPObj);
>>> CID 1209000:  Error handling issues  (CHECKED_RETURN)
>>> Calling "InsertNewTable" without checking return value (as is done 
>>> elsewhere 24 out of 27 times).
270 pDPs->InsertNewTable(pDPObj2);
271 
272 aOutRange = pDPObj2->GetOutRange();
273 pDPObj2->ClearTableData();
274 pDPObj2->Output(aOutRange.aStart);
275 {



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpyoWMum4BOPLCbZkP4ElPN2XL5LrZw5vnvCKuYPJxy8gIUr7rlwvayUt-2FCrYAUdNAECsYVNwsRTaTlzWt6WER5VQVXqk4CCYgDEjyskpCU4hJR4Ikq-2FtV7wY8p6Hb9aLkqcgXD4soOrM-2FKLkHqNcen6lUYf5hy8FgBsFCMgU7IIgA-3D

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


New Defects reported by Coverity Scan for LibreOffice

2018-05-03 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.
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 8 of 8 defect(s)


** CID 1435279:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/gdi/pdfwriter_impl.hxx: 606 in 
vcl::PDFWriterImpl::PDFGlyph::PDFGlyph(const Point &, const GlyphItem *, int, 
int, unsigned char, int)()



*** CID 1435279:  Uninitialized members  (UNINIT_CTOR)
/vcl/source/gdi/pdfwriter_impl.hxx: 606 in 
vcl::PDFWriterImpl::PDFGlyph::PDFGlyph(const Point &, const GlyphItem *, int, 
int, unsigned char, int)()
600   sal_Int32 nFontId,
601   sal_uInt8 nMappedGlyphId,
602   int nCharPos )
603 : m_aPos( rPos ), m_pGlyph(pGlyph), m_nNativeWidth( 
nNativeWidth ),
604   m_nMappedFontId( nFontId ), m_nMappedGlyphId( nMappedGlyphId 
),
605   m_nCharPos(nCharPos)
>>> CID 1435279:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "m_nCharCount" is not initialized in this 
>>> constructor nor in any functions that it calls.
606 {}
607 };
608 
609 static const sal_Char* getStructureTag( PDFWriter::StructElement );
610 static const sal_Char* getAttributeTag( PDFWriter::StructAttribute 
eAtr );
611 static const sal_Char* getAttributeValueTag( 
PDFWriter::StructAttributeValue eVal );

** CID 1435278:  Resource leaks  (RESOURCE_LEAK)
/vcl/source/bitmap/BitmapMosaicFilter.cxx: 179 in 
BitmapMosaicFilter::execute(const BitmapEx &)()



*** CID 1435278:  Resource leaks  (RESOURCE_LEAK)
/vcl/source/bitmap/BitmapMosaicFilter.cxx: 179 in 
BitmapMosaicFilter::execute(const BitmapEx &)()
173 
174 aBitmap = *pNewBmp;
175 
176 aBitmap.SetPrefMapMode(aMap);
177 aBitmap.SetPrefSize(aPrefSize);
178 }
>>> CID 1435278:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "pWriteAcc" going out of scope leaks the storage it points to.
179 }
180 
181 if (bRet)
182 return rBitmapEx;
183 
184 return BitmapEx();
185 }
186 

** CID 1435277:  Control flow issues  (DEADCODE)
/svl/source/numbers/zforfind.cxx: 1217 in 
ImpSvNumberInputScan::IsAcceptedDatePattern(unsigned short)()



*** CID 1435277:  Control flow issues  (DEADCODE)
/svl/source/numbers/zforfind.cxx: 1217 in 
ImpSvNumberInputScan::IsAcceptedDatePattern(unsigned short)()
1211 xLocaleData.changeLocale( aSaveLocale);
1212 // When concatenating don't care about duplicates, 
combining
1213 // weeding those out reallocs yet another time and 
probably doesn't
1214 // take less time than looping over two additional 
patterns below..
1215 switch (eEDF)
1216 {
>>> CID 1435277:  Control flow issues  (DEADCODE)
>>> Execution cannot reach this statement: "case NF_EVALDATEFORMAT_FORMAT:".
1217 case NF_EVALDATEFORMAT_FORMAT:
1218 assert(!"shouldn't reach here");
1219 break;
1220 case NF_EVALDATEFORMAT_INTL:
1221 sDateAcceptancePatterns = aLocalePatterns;
1222 break;

** CID 1435276:  Resource leaks  (RESOURCE_LEAK)
/vcl/source/bitmap/BitmapMosaicFilter.cxx: 179 in 
BitmapMosaicFilter::execute(const BitmapEx &)()



*** CID 1435276:  Resource leaks  (RESOURCE_LEAK)
/vcl/source/bitmap/BitmapMosaicFilter.cxx: 179 in 
BitmapMosaicFilter::execute(const BitmapEx &)()
173 
174 aBitmap = *pNewBmp;
175 
176 aBitmap.SetPrefMapMode(aMap);
177 aBitmap.SetPrefSize(aPrefSize);
178 }
>>> CID 1435276:  Resource leaks  (RESOURCE_LEAK)
>>> Variable "pNewBmp" going out of scope leaks the storage it points to.
179 }
180 
181 if (bRet)
182 return rBitmapEx;
183 
184 return BitmapEx();
185 }
186 

** CID 1435275:  Uninitialized members  (UNINIT_CTOR)
/sfx2/source/sidebar/SidebarDockingWindow.cxx: 50 in 
sfx2::sidebar::SidebarDockingWindow::SidebarDockingWindow(SfxBindings *, 
sfx2::sidebar::SidebarChildWindow &, vcl::Window *, long)()


___

New Defects reported by Coverity Scan for LibreOffice

2018-05-05 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.
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 11 of 11 defect(s)


** CID 1435443:  API usage errors  (SWAPPED_ARGUMENTS)



*** CID 1435443:  API usage errors  (SWAPPED_ARGUMENTS)
/svx/source/accessibility/svxrectctaccessiblecontext.cxx: 854 in 
RectCtlAccessibleContext::FireChildFocus(RectPoint)()
848 }
849 else
850 {
851 Any aOld;
852 Any aNew;
853 aNew <<= AccessibleStateType::FOCUSED;
>>> CID 1435443:  API usage errors  (SWAPPED_ARGUMENTS)
>>> The positions of arguments in the call to "NotifyAccessibleEvent" do 
>>> not match the ordering of the parameters:
* "aNew" is passed to "_rOldValue"
* "aOld" is passed to "_rNewValue"
854 NotifyAccessibleEvent(AccessibleEventId::STATE_CHANGED, 
aNew, aOld);
855 }
856 }
857 else
858 mnSelectedChild = NOCHILDSELECTED;
859 }

** CID 1435442:  Error handling issues  (CHECKED_RETURN)
/vcl/source/image/ImplImageTree.cxx: 611 in ImplImageTree::getNameAccess()()



*** CID 1435442:  Error handling issues  (CHECKED_RETURN)
/vcl/source/image/ImplImageTree.cxx: 611 in ImplImageTree::getNameAccess()()
605 }
606 return rNameAccess.is();
607 }
608 
609 css::uno::Reference const & 
ImplImageTree::getNameAccess()
610 {
>>> CID 1435442:  Error handling issues  (CHECKED_RETURN)
>>> Calling "checkPathAccess" without checking return value (as is done 
>>> elsewhere 4 out of 5 times).
611 checkPathAccess();
612 return getCurrentIconSet().maNameAccess;
613 }
614 

** CID 1435441:(UNINIT_CTOR)
/usr/include/c++/7/bits/regex.h: 2460 in 
std::__cxx11::regex_iterator<__gnu_cxx::__normal_iterator, 
std::allocator>>, wchar_t, 
std::__cxx11::regex_traits>::regex_iterator()()
/usr/include/c++/7/bits/regex.h: 2460 in 
std::__cxx11::regex_iterator<__gnu_cxx::__normal_iterator, 
std::allocator>>, char, 
std::__cxx11::regex_traits>::regex_iterator()()



*** CID 1435441:(UNINIT_CTOR)
/usr/include/c++/7/bits/regex.h: 2460 in 
std::__cxx11::regex_iterator<__gnu_cxx::__normal_iterator, 
std::allocator>>, wchar_t, 
std::__cxx11::regex_traits>::regex_iterator()()
2454   /**
2455* @brief Provides a singular iterator, useful for indicating
2456* one-past-the-end of a range.
2457*/
2458   regex_iterator()
2459   : _M_pregex()
>>> CID 1435441:(UNINIT_CTOR)
>>> Non-static class member "_M_flags" is not initialized in this 
>>> constructor nor in any functions that it calls.
2460   { }
2461 
2462   /**
2463* Constructs a %regex_iterator...
2464* @param __a  [IN] The start of a text range to search.
2465* @param __b  [IN] One-past-the-end of the text range to search.
/usr/include/c++/7/bits/regex.h: 2460 in 
std::__cxx11::regex_iterator<__gnu_cxx::__normal_iterator, 
std::allocator>>, char, 
std::__cxx11::regex_traits>::regex_iterator()()
2454   /**
2455* @brief Provides a singular iterator, useful for indicating
2456* one-past-the-end of a range.
2457*/
2458   regex_iterator()
2459   : _M_pregex()
>>> CID 1435441:(UNINIT_CTOR)
>>> Non-static class member "_M_flags" is not initialized in this 
>>> constructor nor in any functions that it calls.
2460   { }
2461 
2462   /**
2463* Constructs a %regex_iterator...
2464* @param __a  [IN] The start of a text range to search.
2465* @param __b  [IN] One-past-the-end of the text range to search.

** CID 1435440:  FindBugs: Dodgy code  (FB.URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD)
/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java: 71 in ()



*** CID 1435440:  FindBugs: Dodgy code  
(FB.URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD)
/qadevOOo/tests/java/ifc/chart/_ChartDataPointProperties.java: 71 in ()
65 if (Line == null) throw new StatusException(Status.failed
66 ("Relation 'LINE' not found"));
67 
68 doc.setDiagram(Line);
69 }
70 
>>> CID 1435440:  FindBugs: Dodgy code  
>>> (FB.URF_U

New Defects reported by Coverity Scan for LibreOffice

2018-05-11 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 1435548:  Null pointer dereferences  (FORWARD_NULL)



*** CID 1435548:  Null pointer dereferences  (FORWARD_NULL)
/vcl/unx/generic/glyphs/freetype_glyphcache.cxx: 350 in 
FreetypeManager::CreateFont(const FontSelectPattern &)()
344 if( it != maFontList.end() )
345 pFontInfo = it->second;
346 
347 if( !pFontInfo )
348 return nullptr;
349 
>>> CID 1435548:  Null pointer dereferences  (FORWARD_NULL)
>>> Passing "rFSD" to "FreetypeFont", which dereferences null 
>>> "rFSD.mpFontInstance".
350 FreetypeFont* pNew = new FreetypeFont( rFSD, pFontInfo );
351 
352 return pNew;
353 }
354 
355 FreetypeFontFace::FreetypeFontFace( FreetypeFontInfo* pFI, const 
FontAttributes& rDFA )



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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpycS-2F92O8orO4Q-2Fk01A7bIGoYhrD6AZcwiPgULuUrraH7MqyTaIXy1oCfqtMvTRernhWugNKbTjbCcEc6NLE29wpRR3d3y6vPUYw1tkS1fVyqnQee6DNhe3-2F9SqpSP9nhQUtProLUDUFzMSb0ZoPjNbLMur81Kku-2BFgfeCK-2FUBolM-3D

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


  1   2   3   4   5   6   7   >