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.
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 4 of 4 defect(s)
** CID 1323913:  Uninitialized members  (UNINIT_CTOR)
/oox/source/ole/vbaexport.cxx: 70 in VBACompressionChunk::VBACompressionChunk(SvStream &, const 
unsigned char *, unsigned long)()
________________________________________________________________________________________________________
*** CID 1323913:  Uninitialized members  (UNINIT_CTOR)
/oox/source/ole/vbaexport.cxx: 70 in VBACompressionChunk::VBACompressionChunk(SvStream &, const 
unsigned char *, unsigned long)()
64     
65     VBACompressionChunk::VBACompressionChunk(SvStream& rCompressedStream, const sal_uInt8* 
pData, sal_Size nChunkSize):
66         mrCompressedStream(rCompressedStream),
67         mpUncompressedData(pData),
68         mnChunkSize(nChunkSize)
69     {
    CID 1323913:  Uninitialized members  (UNINIT_CTOR)
    Non-static class member "mnDecompressedEnd" is not initialized in this constructor nor in 
any functions that it calls.
70     }
71     
72     void setUInt16(sal_uInt8* pBuffer, size_t nPos, sal_uInt16 nVal)
73     {
74         pBuffer[nPos] = nVal & 0xFF;
75         pBuffer[nPos+1] = (nVal & 0xFF00) >> 8;
** CID 1323912:  Integer handling issues  (NEGATIVE_RETURNS)
/oox/source/ole/vbaexport.cxx: 633 in <unnamed>::exportModuleStream(SvStream &, const rtl::OUString 
&, const rtl::OUString &)()
________________________________________________________________________________________________________
*** CID 1323912:  Integer handling issues  (NEGATIVE_RETURNS)
/oox/source/ole/vbaexport.cxx: 633 in <unnamed>::exportModuleStream(SvStream &, const rtl::OUString 
&, const rtl::OUString &)()
627     void exportModuleStream(SvStream& rStrm, const OUString& rSourceCode, const OUString& 
aElementName)
628     {
629         SvMemoryStream aModuleStream(4096, 4096);
630     
631         exportString(aModuleStream, "Attribute VB_Name = \"" + aElementName + "\"\r\n");
632         OUString aSourceCode = rSourceCode.replaceFirst("Option VBASupport 1\n", "");
    CID 1323912:  Integer handling issues  (NEGATIVE_RETURNS)
    Assigning: signed variable "nPos" = "indexOf".
633         sal_Int32 nPos = aSourceCode.indexOf("Rem Attribute VBA_ModuleType=");
634         sal_Int32 nEndPos = aSourceCode.indexOf("\n", nPos);
635         aSourceCode = aSourceCode.replaceAt(nPos, nEndPos - nPos+1, "");
636         aSourceCode = aSourceCode.replaceAll("\n", "\r\n");
637         exportString(aModuleStream, aSourceCode);
638         aModuleStream.Seek(0);
** CID 1040971:  API usage errors  (STREAM_FORMAT_STATE)
/usr/include/boost/property_tree/stream_translator.hpp: 99 in 
boost::property_tree::customize_stream<char, std::char_traits<char>, float, 
void>::insert(std::basic_ostream<char, std::char_traits<char>>&, const float &)()
________________________________________________________________________________________________________
*** CID 1040971:  API usage errors  (STREAM_FORMAT_STATE)
/usr/include/boost/property_tree/stream_translator.hpp: 99 in 
boost::property_tree::customize_stream<char, std::char_traits<char>, float, 
void>::insert(std::basic_ostream<char, std::char_traits<char>>&, const float &)()
93             typename boost::enable_if< detail::is_inexact<F> >::type
94         >
95         {
96             static void insert(std::basic_ostream<Ch, Traits>& s, const F& e) {
97                 s.precision(std::numeric_limits<F>::digits10 + 1);
98                 s << e;
    CID 1040971:  API usage errors  (STREAM_FORMAT_STATE)
    Changing format state of stream "s" for category precision without later restoring it.
99             }
100             static void extract(std::basic_istream<Ch, Traits>& s, F& e) {
101                 s >> e;
102                 if(!s.eof()) {
103                     s >> std::ws;
104                 }
** CID 1038332:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/filter/excel/xestream.cxx: 1053 in XclExpXmlStream::exportDocument()()
________________________________________________________________________________________________________
*** CID 1038332:  Error handling issues  (UNCAUGHT_EXCEPT)
/sc/source/filter/excel/xestream.cxx: 1053 in XclExpXmlStream::exportDocument()()
1047         if ( pObj )
1048             return static_cast < ScDocShell* >( pObj->GetEmbeddedObject() );
1049     
1050         return 0;
1051     }
1052     
    CID 1038332:  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().
1053     bool XclExpXmlStream::exportDocument()
1054         throw (css::uno::RuntimeException, std::exception)
1055     {
1056         ScDocShell* pShell = getDocShell();
1057         ScDocument& rDoc = pShell->GetDocument();
1058         ScRefreshTimerProtector aProt(rDoc.GetRefreshTimerControlAddress());
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://scan.coverity.com/projects/libreoffice?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
Context
- New Defects reported by Coverity Scan for LibreOffice · scan-admin
 
   
 
  Privacy Policy |
  
Impressum (Legal Info) |
  
Copyright information: Unless otherwise specified, all text and images
  on this website are licensed under the
  
Creative Commons Attribution-Share Alike 3.0 License.
  This does not include the source code of LibreOffice, which is
  licensed under the Mozilla Public License (
MPLv2).
  "LibreOffice" and "The Document Foundation" are
  registered trademarks of their corresponding registered owners or are
  in actual use as trademarks in one or more countries. Their respective
  logos and icons are also subject to international copyright laws. Use
  thereof is explained in our 
trademark policy.