[Libreoffice-commits] core.git: 5 commits - codemaker/source comphelper/source vcl/source

Caolán McNamara caolanm at redhat.com
Mon Jan 27 07:23:49 PST 2014


 codemaker/source/javamaker/javatype.cxx                 |    6 ++++--
 comphelper/source/eventattachermgr/eventattachermgr.cxx |   15 +++++++--------
 vcl/source/filter/jpeg/JpegReader.cxx                   |    6 +++---
 3 files changed, 14 insertions(+), 13 deletions(-)

New commits:
commit 0535281003a9001558187bef7012d2ee0ae3e4fb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 15:19:06 2014 +0000

    coverity#707679 Uninitialized scalar field
    
    Change-Id: I41c98456506a3ef843362b20c4db4a8d409319d6

diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 99b25a9..782eb92 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -361,6 +361,7 @@ ImplEventAttacherManager::ImplEventAttacherManager( const Reference< XIntrospect
     : aScriptListeners( aLock )
     , mxContext( xContext )
     , mxIntrospection( rIntrospection )
+    , nVersion(0)
 {
     if ( xContext.is() )
     {
commit 7677c52ae102f471c5504d5276dff6480ab6cdf0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 15:14:21 2014 +0000

    coverity#705787 Dereference before null check
    
    Change-Id: I4d6e4ddaa104a025349c55ab75263004a6b2b6bf

diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 53a115d..99b25a9 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -464,10 +464,9 @@ void SAL_CALL ImplEventAttacherManager::registerScriptEvent
     ::std::deque< AttachedObject_Impl > aList = (*aIt).aObjList;
 
     ScriptEventDescriptor aEvt = ScriptEvent;
-    const sal_Unicode* pLastDot = aEvt.ListenerType.getStr();
-    pLastDot += rtl_ustr_lastIndexOfChar( pLastDot, '.' );
-    if( pLastDot )
-        aEvt.ListenerType = pLastDot +1;
+    sal_Int32 nLastDot = aEvt.ListenerType.lastIndexOf('.');
+    if (nLastDot != -1)
+        aEvt.ListenerType = aEvt.ListenerType.copy(nLastDot+1);
     (*aIt).aEventList.push_back( aEvt );
 
     // register new new Event
@@ -538,10 +537,9 @@ void SAL_CALL ImplEventAttacherManager::revokeScriptEvent
     ::std::for_each(aList.begin(), aList.end(), DetachObject(*this, nIndex));
 
     OUString aLstType = ListenerType;
-    const sal_Unicode * pLastDot = aLstType.getStr();
-    pLastDot += rtl_ustr_lastIndexOfChar( pLastDot, '.' );
-    if( pLastDot )
-        aLstType = pLastDot +1;
+    sal_Int32 nLastDot = aLstType.lastIndexOf('.');
+    if (nLastDot != -1)
+        aLstType = aLstType.copy(nLastDot+1);
 
     ::std::deque< ScriptEventDescriptor >::iterator aEvtIt =    (*aIt).aEventList.begin();
     ::std::deque< ScriptEventDescriptor >::iterator aEvtEnd =   (*aIt).aEventList.end();
commit 8bb41c67f0d3b5773fd14153d3489e59d6848a05
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 15:09:54 2014 +0000

    coverity#1019407 Uninitialized scalar field
    
    Change-Id: Icaa2062b00e0a68486bcbbc4a26b4089016bf2c8

diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index 3020087..e7d3f6d 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -480,7 +480,8 @@ TypeInfo::TypeInfo(
     m_kind(KIND_PARAMETER), m_name(parameterName),
     m_flags(translateSpecialTypeFlags(specialType, inParameter, outParameter)),
     m_index(index), m_methodName(methodName),
-    m_polymorphicUnoType(polymorphicUnoType)
+    m_polymorphicUnoType(polymorphicUnoType),
+    m_typeParameterIndex(0)
 {}
 
 sal_uInt16 TypeInfo::generateCode(
commit 9f030d43ef478b2ab046ad71bf930774f3b4ac1d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 15:08:16 2014 +0000

    coverity#1019406 Uninitialized scalar field
    
    Change-Id: I9f5d48c5c5c0f76aa3386cfedcaf43ced162e4b0

diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index bee2ba9..3020087 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -467,7 +467,8 @@ TypeInfo::TypeInfo(
     sal_Int32 index, PolymorphicUnoType const & polymorphicUnoType):
     m_kind(kind), m_name(name),
     m_flags(flags | translateSpecialTypeFlags(specialType, false, false)),
-    m_index(index), m_polymorphicUnoType(polymorphicUnoType)
+    m_index(index), m_polymorphicUnoType(polymorphicUnoType),
+    m_typeParameterIndex(0)
 {
     assert(kind == KIND_ATTRIBUTE || kind == KIND_METHOD);
 }
commit 53c803004554a3a0fff26501357a183bba008a26
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 27 15:05:33 2014 +0000

    Resolves: fdo#74051 support 8430x11700 jpegs
    
    Change-Id: I1ca95a496bca80e5e2787af2ccbf0f6cd42455a5

diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 1cc4848..5d3af16 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -36,11 +36,11 @@ extern "C"
 #define JPEG_MIN_READ 512
 #define BUFFER_SIZE  4096
 namespace {
-    // Arbitrary maximal size (256M) of bitmaps after they have been decoded.
+    // Arbitrary maximal size (512M) of a bitmap after it has been decoded.
     // It is used to prevent excessive swapping due to large buffers in
     // virtual memory.
     // May have to be tuned if it turns out to be too large or too small.
-    static const sal_uInt64 MAX_BITMAP_BYTE_SIZE = sal_uInt64(256 * 1024 * 1024);
+    static const sal_uInt64 MAX_BITMAP_BYTE_SIZE = sal_uInt64(512 * 1024 * 1024);
 }
 
 extern "C" void* CreateBitmapFromJPEGReader( void* pJPEGReader, void* pJPEGCreateBitmapParam )
@@ -235,7 +235,7 @@ void* JPEGReader::CreateBitmap( void* _pParam )
 
     sal_uInt64 nSize = aSize.Width();
     nSize *= aSize.Height();
-    if (nSize > SAL_MAX_INT32 / 24)
+    if (nSize > SAL_MAX_INT32 / (bGray?1:3))
         return NULL;
 
     // Check if the bitmap is untypically large.


More information about the Libreoffice-commits mailing list