New Defects reported by Coverity Scan for LibreOffice

scan-admin at coverity.com scan-admin at coverity.com
Thu Nov 2 08:32:30 UTC 2017


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)()
31            the 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<com::sun::star::uno::XComponentContext> &)()


________________________________________________________________________________________________________
*** 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<com::sun::star::uno::XComponentContext> &)()
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<editeng::Section, std::allocator<editeng::Section>> &, const EditTextObject &)()


________________________________________________________________________________________________________
*** CID 1420536:  Null pointer dereferences  (FORWARD_NULL)
/sd/source/ui/view/drviews2.cxx: 317 in sd::ClassificationCollector::iterateSectionsAndCollect(const std::vector<editeng::Section, std::allocator<editeng::Section>> &, 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 <editeng::CustomPropertyField const *>(pFieldItem->GetField())".
317                     const auto* pCustomPropertyField = dynamic_cast<const editeng::CustomPropertyField*>(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=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRZBnDJeNb0HijxaS4JNJPxk3kpyAm2AYqo71yXmnOxB72ibeUH-2F-2F1Lhi9AZq3dRu-2F4-3D_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy0cs9CpEPvGt5g-2FK2mEfwyoPr3D9nXW9-2FCZDXVZN2LdzLQhDEYJ8-2F84xe-2BXSIDYjLHxpePePiFfTrP957hMgZEHRVGzycvasJeHxz4h-2B7-2FbIJwHoLjckMMSeISCgrGg6LyBt3u7A3qXiNYvCQUbLLj-2FxYBqerd8yNEhuyfpxXeK8-3D

To manage Coverity Scan email notifications for "libreoffice at lists.freedesktop.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4k1FZJSDV-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5lwWgMDuK-2FivqaohkU3M9kT-2Fww10Qt2GoaCJAOQCa0Wv4ijH4oV8jCt0XXa7QeAwh_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy0cs9CpEPvGt5g-2FK2mEfwys-2B5HzHq-2FHTVZPCa-2F4RLGqLBHaRDosv5Z91olAFtppjg7VNOlADPEhkloa4opk57KwaCzeBi9U1AySX5wWpVzQlj5X8ZN-2BKxUOd-2Fv8Nt3l3SH9gXxgwrHuxCHB4xKgy4mKpcmuMmStXlVd-2FPWoZ0geE-3D



More information about the LibreOffice mailing list