[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 25 20:47:04 UTC 2021


 vcl/source/filter/ipcd/ipcd.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 593d7b8dcbf8bd53377137b88416c95b3a2651c8
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 23 20:01:07 2021 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Aug 25 22:46:29 2021 +0200

    ofz: MemorySanitizer: use-of-uninitialized-value
    
    Change-Id: Icc09937594ddc97706a63bd11afe062a854ae8ce
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120921
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 6097ea726dcc087694a600cf823761097e3ba13e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120978
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/vcl/source/filter/ipcd/ipcd.cxx b/vcl/source/filter/ipcd/ipcd.cxx
index 10c4abc30549..b3377c8934e3 100644
--- a/vcl/source/filter/ipcd/ipcd.cxx
+++ b/vcl/source/filter/ipcd/ipcd.cxx
@@ -162,7 +162,6 @@ bool PCDReader::ReadPCD( Graphic & rGraphic, FilterConfigItem* pConfigItem )
     return bStatus;
 }
 
-
 void PCDReader::CheckPCDImagePacFile()
 {
     char Buf[ 8 ];
@@ -170,11 +169,10 @@ void PCDReader::CheckPCDImagePacFile()
     m_rPCD.Seek( 2048 );
     m_rPCD.ReadBytes(Buf, 7);
     Buf[ 7 ] = 0;
-    if (Buf != std::string_view("PCD_IPI"))
+    if (!m_rPCD.good() || Buf != std::string_view("PCD_IPI"))
         bStatus = false;
 }
 
-
 void PCDReader::ReadOrientation()
 {
     if ( !bStatus )
@@ -184,7 +182,6 @@ void PCDReader::ReadOrientation()
     nOrientation &= 0x03;
 }
 
-
 void PCDReader::ReadImage()
 {
     sal_uInt32  nx,ny,nW2,nH2,nYPair,ndy,nXPair;


More information about the Libreoffice-commits mailing list