Hi,

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

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


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


** CID 1403674:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4080 in ScInterpreter::ScRow()()


________________________________________________________________________________________________________
*** CID 1403674:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4080 in ScInterpreter::ScRow()()
4074                 switch ( GetStackType() )
4075                 {
4076                     case svSingleRef :
4077                     {
4078                         SCCOL nCol1;
4079                         SCROW nRow1;
>>>     CID 1403674:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "nTab1" without initializer.
4080                         SCTAB nTab1;
4081                         PopSingleRef( nCol1, nRow1, nTab1 );
4082                         nVal = (double) (nRow1 + 1);
4083                     }
4084                     break;
4085                     case svDoubleRef :

** CID 1403673:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4146 in ScInterpreter::ScSheet()()


________________________________________________________________________________________________________
*** CID 1403673:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4146 in ScInterpreter::ScSheet()()
4140                             SetError( FormulaError::IllegalArgument );
4141                     }
4142                     break;
4143                     case svSingleRef :
4144                     {
4145                         SCCOL nCol1;
>>>     CID 1403673:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "nRow1" without initializer.
4146                         SCROW nRow1;
4147                         SCTAB nTab1;
4148                         PopSingleRef( nCol1, nRow1, nTab1 );
4149                         nVal = nTab1 + 1;
4150                     }
4151                     break;

** CID 1403672:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4079 in ScInterpreter::ScRow()()


________________________________________________________________________________________________________
*** CID 1403672:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4079 in ScInterpreter::ScRow()()
4073             {
4074                 switch ( GetStackType() )
4075                 {
4076                     case svSingleRef :
4077                     {
4078                         SCCOL nCol1;
>>>     CID 1403672:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "nRow1" without initializer.
4079                         SCROW nRow1;
4080                         SCTAB nTab1;
4081                         PopSingleRef( nCol1, nRow1, nTab1 );
4082                         nVal = (double) (nRow1 + 1);
4083                     }
4084                     break;

** CID 1403671:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 3998 in ScInterpreter::ScColumn()()


________________________________________________________________________________________________________
*** CID 1403671:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 3998 in ScInterpreter::ScColumn()()
3992             {
3993                 switch ( GetStackType() )
3994                 {
3995                     case svSingleRef :
3996                     {
3997                         SCCOL nCol1;
>>>     CID 1403671:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "nRow1" without initializer.
3998                         SCROW nRow1;
3999                         SCTAB nTab1;
4000                         PopSingleRef( nCol1, nRow1, nTab1 );
4001                         nVal = (double) (nCol1 + 1);
4002                     }
4003                     break;

** CID 1403670:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4147 in ScInterpreter::ScSheet()()


________________________________________________________________________________________________________
*** CID 1403670:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4147 in ScInterpreter::ScSheet()()
4141                     }
4142                     break;
4143                     case svSingleRef :
4144                     {
4145                         SCCOL nCol1;
4146                         SCROW nRow1;
>>>     CID 1403670:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "nTab1" without initializer.
4147                         SCTAB nTab1;
4148                         PopSingleRef( nCol1, nRow1, nTab1 );
4149                         nVal = nTab1 + 1;
4150                     }
4151                     break;
4152                     case svDoubleRef :

** CID 1403669:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4078 in ScInterpreter::ScRow()()


________________________________________________________________________________________________________
*** CID 1403669:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4078 in ScInterpreter::ScRow()()
4072             else
4073             {
4074                 switch ( GetStackType() )
4075                 {
4076                     case svSingleRef :
4077                     {
>>>     CID 1403669:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "nCol1" without initializer.
4078                         SCCOL nCol1;
4079                         SCROW nRow1;
4080                         SCTAB nTab1;
4081                         PopSingleRef( nCol1, nRow1, nTab1 );
4082                         nVal = (double) (nRow1 + 1);
4083                     }

** CID 1403668:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 3999 in ScInterpreter::ScColumn()()


________________________________________________________________________________________________________
*** CID 1403668:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 3999 in ScInterpreter::ScColumn()()
3993                 switch ( GetStackType() )
3994                 {
3995                     case svSingleRef :
3996                     {
3997                         SCCOL nCol1;
3998                         SCROW nRow1;
>>>     CID 1403668:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "nTab1" without initializer.
3999                         SCTAB nTab1;
4000                         PopSingleRef( nCol1, nRow1, nTab1 );
4001                         nVal = (double) (nCol1 + 1);
4002                     }
4003                     break;
4004                     case svDoubleRef :

** CID 1403667:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 3997 in ScInterpreter::ScColumn()()


________________________________________________________________________________________________________
*** CID 1403667:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 3997 in ScInterpreter::ScColumn()()
3991             else
3992             {
3993                 switch ( GetStackType() )
3994                 {
3995                     case svSingleRef :
3996                     {
>>>     CID 1403667:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "nCol1" without initializer.
3997                         SCCOL nCol1;
3998                         SCROW nRow1;
3999                         SCTAB nTab1;
4000                         PopSingleRef( nCol1, nRow1, nTab1 );
4001                         nVal = (double) (nCol1 + 1);
4002                     }

** CID 1403666:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4145 in ScInterpreter::ScSheet()()


________________________________________________________________________________________________________
*** CID 1403666:  Uninitialized variables  (UNINIT)
/sc/source/core/tool/interpr1.cxx: 4145 in ScInterpreter::ScSheet()()
4139                         else
4140                             SetError( FormulaError::IllegalArgument );
4141                     }
4142                     break;
4143                     case svSingleRef :
4144                     {
>>>     CID 1403666:  Uninitialized variables  (UNINIT)
>>>     Declaring variable "nCol1" without initializer.
4145                         SCCOL nCol1;
4146                         SCROW nRow1;
4147                         SCTAB nTab1;
4148                         PopSingleRef( nCol1, nRow1, nTab1 );
4149                         nVal = nTab1 + 1;
4150                     }

** CID 1403665:  Parse warnings  (PARSE_ERROR)
/include/xmloff/xmlement.hxx: 48 in ()


________________________________________________________________________________________________________
*** CID 1403665:  Parse warnings  (PARSE_ERROR)
/include/xmloff/xmlement.hxx: 48 in ()
42         EnumT                           GetValue() const { return 
static_cast<EnumT>(nValue); }
43     };
44     
45     // specialisation to avoid lots of "C2398: conversion from 'const 
sal_Int16' to 'sal_uInt16' requires a narrowing conversion"
46     // errors when compiling on MSVC
47     template<>
>>>     CID 1403665:  Parse warnings  (PARSE_ERROR)
>>>     During compilation of file 
>>> '/mnt/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx'
48     struct SvXMLEnumMapEntry<sal_uInt16>
49     {
50     private:
51         ::xmloff::token::XMLTokenEnum   eToken;
52         sal_uInt16                      nValue;
53     public:

** CID 1403664:  Null pointer dereferences  (NULL_RETURNS)
/vcl/source/window/toolbox.cxx: 4826 in ToolBox::KeyInput(const KeyEvent &)()


________________________________________________________________________________________________________
*** CID 1403664:  Null pointer dereferences  (NULL_RETURNS)
/vcl/source/window/toolbox.cxx: 4826 in ToolBox::KeyInput(const KeyEvent &)()
4820             {
4821                 // #107712#, disabled entries are selectable now
4822                 //  leave toolbox and move focus to document
4823                 if( mnHighItemId )
4824                 {
4825                     ImplToolItem *pItem = ImplGetItem( mnHighItemId );
>>>     CID 1403664:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a null pointer "pItem".
4826                     if( !pItem->mbEnabled )
4827                     {
4828                         bGrabFocusToDocument = true;
4829                     }
4830                 }
4831                 if( !bGrabFocusToDocument )

** CID 1403663:  Null pointer dereferences  (NULL_RETURNS)
/vcl/source/window/toolbox.cxx: 5210 in ToolBox::ImplShowFocus()()


________________________________________________________________________________________________________
*** CID 1403663:  Null pointer dereferences  (NULL_RETURNS)
/vcl/source/window/toolbox.cxx: 5210 in ToolBox::ImplShowFocus()()
5204     }
5205     
5206     void ToolBox::ImplShowFocus()
5207     {
5208         if( mnHighItemId && HasFocus() )
5209         {
>>>     CID 1403663:  Null pointer dereferences  (NULL_RETURNS)
>>>     Assigning: "pItem" = null return value from "ImplGetItem".
5210             ImplToolItem* pItem = ImplGetItem( mnHighItemId );
5211             if( pItem->mpWindow && !pItem->mpWindow->IsDisposed() )
5212             {
5213                 vcl::Window *pWin = 
pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? 
pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow.get() : 
pItem->mpWindow.get();
5214                 pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = 
true;
5215                 pWin->Invalidate();

** CID 1403662:  Incorrect expression  (MIXED_ENUMS)
/xmloff/source/style/postuhdl.cxx: 53 in XMLPosturePropHdl::importXML(const 
rtl::OUString &, com::sun::star::uno::Any &, const SvXMLUnitConverter &) const()


________________________________________________________________________________________________________
*** CID 1403662:  Incorrect expression  (MIXED_ENUMS)
/xmloff/source/style/postuhdl.cxx: 53 in XMLPosturePropHdl::importXML(const 
rtl::OUString &, com::sun::star::uno::Any &, const SvXMLUnitConverter &) const()
47     
48     bool XMLPosturePropHdl::importXML( const OUString& rStrImpValue, 
uno::Any& rValue, const SvXMLUnitConverter& ) const
49     {
50         FontItalic ePosture;
51         bool bRet = SvXMLUnitConverter::convertEnum( ePosture, rStrImpValue, 
aPostureGenericMapping );
52         if( bRet )
>>>     CID 1403662:  Incorrect expression  (MIXED_ENUMS)
>>>     Mixing enum types "com::sun::star::awt::FontSlant" and "FontItalic" for 
>>> "<temporary>".
53             rValue <<= (awt::FontSlant)ePosture;
54     
55         return bRet;
56     }
57     
58     bool XMLPosturePropHdl::exportXML( OUString& rStrExpValue, const 
uno::Any& rValue, const SvXMLUnitConverter& ) const

** CID 1403661:  Incorrect expression  (MIXED_ENUMS)
/sc/source/core/data/dptabsrc.cxx: 1564 in 
ScDPDimension::getPropertyValue(const rtl::OUString &)()


________________________________________________________________________________________________________
*** CID 1403661:  Incorrect expression  (MIXED_ENUMS)
/sc/source/core/data/dptabsrc.cxx: 1564 in 
ScDPDimension::getPropertyValue(const rtl::OUString &)()
1558         }
1559         else if ( aPropertyName == SC_UNO_DP_FUNCTION )
1560         {
1561             ScGeneralFunction nVal = getFunction();
1562             if (nVal == ScGeneralFunction::MEDIAN)
1563                 nVal = ScGeneralFunction::NONE;
>>>     CID 1403661:  Incorrect expression  (MIXED_ENUMS)
>>>     Mixing enum types "com::sun::star::sheet::GeneralFunction" and 
>>> "ScGeneralFunction" for "<temporary>".
1564             aRet <<= (sheet::GeneralFunction)nVal;
1565         }
1566         else if ( aPropertyName == SC_UNO_DP_FUNCTION2 )
1567         {
1568             ScGeneralFunction eVal = getFunction();
1569             aRet <<= (sal_Int16)eVal;

** CID 1403660:  Incorrect expression  (MIXED_ENUMS)
/sc/source/ui/unoobj/dapiuno.cxx: 1835 in 
ScDataPilotFieldObj::setPropertyValue(const rtl::OUString &, const 
com::sun::star::uno::Any &)()


________________________________________________________________________________________________________
*** CID 1403660:  Incorrect expression  (MIXED_ENUMS)
/sc/source/ui/unoobj/dapiuno.cxx: 1835 in 
ScDataPilotFieldObj::setPropertyValue(const rtl::OUString &, const 
com::sun::star::uno::Any &)()
1829             uno::Sequence<sheet::GeneralFunction> aSeq;
1830             if( aValue >>= aSeq)
1831             {
1832                 std::vector< ScGeneralFunction > 
aSubTotals(aSeq.getLength());
1833                 for (sal_Int32 nIndex = 0; nIndex < aSeq.getLength(); 
nIndex++)
1834                 {
>>>     CID 1403660:  Incorrect expression  (MIXED_ENUMS)
>>>     Mixing enum types "ScGeneralFunction" and 
>>> "com::sun::star::sheet::GeneralFunction" for dereference of 
>>> "std::vector<ScGeneralFunction, std::allocator<ScGeneralFunction> 
>>> >::operator [](std::vector<ScGeneralFunction, 
>>> std::allocator<ScGeneralFunction> >::size_type)".
1835                     aSubTotals[nIndex] = 
static_cast<ScGeneralFunction>(aSeq[nIndex]);
1836                 }
1837                 setSubtotals( aSubTotals );
1838             }
1839         }
1840         else if ( aPropertyName == SC_UNONAME_SUBTOTALS2 )

** CID 1403659:  Concurrent data access violations  (MISSING_LOCK)
/comphelper/source/misc/threadpool.cxx: 156 in 
comphelper::ThreadPool::shutdownLocked(std::unique_lock<std::mutex> &)()


________________________________________________________________________________________________________
*** CID 1403659:  Concurrent data access violations  (MISSING_LOCK)
/comphelper/source/misc/threadpool.cxx: 156 in 
comphelper::ThreadPool::shutdownLocked(std::unique_lock<std::mutex> &)()
150         {
151             while( !maTasks.empty() )
152                 maTasksChanged.wait( aGuard );
153         }
154         assert( maTasks.empty() );
155     
>>>     CID 1403659:  Concurrent data access violations  (MISSING_LOCK)
>>>     Accessing "this->mbTerminate" without holding lock 
>>> "comphelper::ThreadPool.maMutex". Elsewhere, 
>>> "_ZN10comphelper10ThreadPoolE.mbTerminate" is accessed with 
>>> "comphelper::ThreadPool.maMutex" held 1 out of 2 times (1 of these accesses 
>>> strongly imply that it is necessary).
156         mbTerminate = true;
157     
158         maTasksChanged.notify_all();
159     
160         decltype(maWorkers) aWorkers;
161         std::swap(maWorkers, aWorkers);

** CID 1403658:    (INTEGER_OVERFLOW)
/shell/source/backends/localebe/localebackend.cxx: 193 in ImplGetLocale(const 
char *)()
/shell/source/backends/localebe/localebackend.cxx: 199 in ImplGetLocale(const 
char *)()


________________________________________________________________________________________________________
*** CID 1403658:    (INTEGER_OVERFLOW)
/shell/source/backends/localebe/localebackend.cxx: 193 in ImplGetLocale(const 
char *)()
187                 break;
188         }
189     
190         OUStringBuffer aLocaleBuffer;
191         if( uscore != nullptr )
192         {
>>>     CID 1403658:    (INTEGER_OVERFLOW)
>>>     Truncation due to cast operation on operand "uscore++ - locale" from 64 
>>> bits to 32 bits. Example value for operand: "uscore++ - locale" = 
>>> 146030727183.
193             aLocaleBuffer.appendAscii(locale, uscore++ - locale);
194             aLocaleBuffer.append("-");
195             aLocaleBuffer.appendAscii(uscore, cp - uscore);
196         }
197         else
198         {
/shell/source/backends/localebe/localebackend.cxx: 199 in ImplGetLocale(const 
char *)()
193             aLocaleBuffer.appendAscii(locale, uscore++ - locale);
194             aLocaleBuffer.append("-");
195             aLocaleBuffer.appendAscii(uscore, cp - uscore);
196         }
197         else
198         {
>>>     CID 1403658:    (INTEGER_OVERFLOW)
>>>     Truncation due to cast operation on operand "cp - locale" from 64 bits 
>>> to 32 bits. Example value for operand: "cp - locale" = 288230376353038338.
199             aLocaleBuffer.appendAscii(locale, cp - locale);
200         }
201     
202         return aLocaleBuffer.makeStringAndClear();
203     }
204     

** CID 1403657:  Error handling issues  (CHECKED_RETURN)
/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx: 267 in 
XMLFootnoteConfigurationImportContext::StartElement(const 
com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList> &)()


________________________________________________________________________________________________________
*** CID 1403657:  Error handling issues  (CHECKED_RETURN)
/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx: 267 in 
XMLFootnoteConfigurationImportContext::StartElement(const 
com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList> &)()
261                     break;
262                 case XML_TOK_FTNCONFIG_NUM_SYNC:
263                     sNumSync = sValue;
264                     break;
265                 case XML_TOK_FTNCONFIG_START_AT:
266                 {
>>>     CID 1403657:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "convertEnum" without checking return value (as is done 
>>> elsewhere 18 out of 21 times).
267                     SvXMLUnitConverter::convertEnum(nNumbering, sValue,
268                                                         
aFootnoteNumberingMap);
269                     break;
270                 }
271                 case XML_TOK_FTNCONFIG_POSITION:
272                     bPosition = IsXMLToken( sValue, XML_DOCUMENT );

** CID 1403656:  Error handling issues  (CHECKED_RETURN)
/xmloff/source/text/XMLLineNumberingImportContext.cxx: 193 in 
XMLLineNumberingImportContext::ProcessAttribute(LineNumberingToken, const 
rtl::OUString &)()


________________________________________________________________________________________________________
*** CID 1403656:  Error handling issues  (CHECKED_RETURN)
/xmloff/source/text/XMLLineNumberingImportContext.cxx: 193 in 
XMLLineNumberingImportContext::ProcessAttribute(LineNumberingToken, const 
rtl::OUString &)()
187                     { XML_RIGHT,    style::LineNumberPosition::RIGHT },
188                     { XML_INSIDE,   style::LineNumberPosition::INSIDE },
189                     { XML_OUTSIDE,  style::LineNumberPosition::OUTSIDE },
190                     { XML_TOKEN_INVALID, 0 }
191                 };
192     
>>>     CID 1403656:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "convertEnum" without checking return value (as is done 
>>> elsewhere 18 out of 21 times).
193                 SvXMLUnitConverter::convertEnum(nNumberPosition, sValue,
194                                                     aLineNumberPositionMap);
195                 break;
196             }
197     
198             case XML_TOK_LINENUMBERING_INCREMENT:


________________________________________________________________________________________________________
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-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy6jMrrjOiH80klgpTwXdwbu9C3Nqhm5X91e0PbJ-2B1CNHeqkJgEwh7rwx9Nu7-2BcpHoZLPaYk7PiBmybdLTK0EvQJxFWBZKbY05g-2FEt4SqQHAG-2B3xOViowiokBOAkFf32b1urN1k72zOBfJyVhx63ANcC7fFp9Zup23RXG-2FpPwjYQo-3D

To manage Coverity Scan email notifications for 
"[email protected]", click 
https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4k1FZJSDV-2FTHi5VQof9xGafB4oBwGYxuHHknceo2QLpCrZ44Ciy7AqBR2QyX6OCB5N5X-2B1MAElavPQhH6nLwozJzqOkt2k8uOkYf2ZoppNa9QVe0T3fEZVQ7Kky1tOkLz_g-2BrHdvqzaBa155F-2F8AmPhpJzY63UzWDisJV95WUBpGhqFw1ICExHG8aMaV2EoFpy6jMrrjOiH80klgpTwXdwbuETjBC-2BmZQAs5kcEwL7bI1coccD-2FyeKDC4Eh1dx2IXkPAW-2B08mUHlwndv9I9KbIt8it-2BC8ndS5dicWYJGaswcPlU42VwQXF7-2B7-2FwJzrl-2FB-2FuVzPyDPa8vCwrZV7EMvUnbf4HQ-2Frgc2nSwdewVHAU30-3D

_______________________________________________
LibreOffice mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to