[Libreoffice-commits] core.git: 2 commits - io/source svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 21 18:14:32 UTC 2018


 io/source/stm/odata.cxx     |    2 +-
 svx/source/xml/xmlgrhlp.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c60e737832fe5f9b4841ba163e22c532f0abe6f4
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Oct 21 14:12:09 2018 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Oct 21 20:14:18 2018 +0200

    tdf#120703 (PVS): redundant nullptr check
    
    V668 There is no sense in testing the 'pDest' pointer against null, as the
         memory was allocated using the 'new' operator. The exception will be
         generated in the case of memory allocation error.
    
    Change-Id: I17773f92ed73359e925ad779d171ec99727f7905
    Reviewed-on: https://gerrit.libreoffice.org/62133
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index b45954fdbd0d..ca23ea3dc7a2 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -331,7 +331,7 @@ Graphic SvXMLGraphicOutputStream::GetGraphic()
                     mpOStm->Seek( 0 );
                     aZCodec.Decompress( *mpOStm, *pDest );
 
-                    if (aZCodec.EndCompression() && pDest )
+                    if (aZCodec.EndCompression())
                     {
                         sal_uIntPtr nStreamLen_ = pDest->TellEnd();
                         if (nStreamLen_)
commit aacbb8bac09409d5a7d31dd8278dd495a0557a49
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 20 21:34:14 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 21 20:14:09 2018 +0200

    pvs-studio: V557 Array overrun is possible
    
    Change-Id: Ia4a7c857b3c94490364ed979ba2fcb9e192e3796
    Reviewed-on: https://gerrit.libreoffice.org/62111
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index 6a62c75d5a63..f942c5d89ccd 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -1150,7 +1150,7 @@ Reference< XPersistObject >  OObjectInputStream::readObject()
             }
         }
         else {
-            if( m_aPersistVector.size() < nId )
+            if (nId >= m_aPersistVector.size())
             {
                 // id unknown, load failure !
                 bLoadSuccessful = false;


More information about the Libreoffice-commits mailing list