sc/source/filter/lotus/lotimpop.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit ba367806deb5e5b63996f2965fe3d9677921af26
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Aug 28 09:56:52 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Aug 29 15:16:40 2021 +0200

    ofz: MemorySanitizer: use-of-uninitialized-value
    
    Change-Id: I649e8b8fa0d1752f0f4b0b6b688cea8ae945bb87
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121186
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sc/source/filter/lotus/lotimpop.cxx 
b/sc/source/filter/lotus/lotimpop.cxx
index cb74275221ca..38a0337a9d25 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -69,6 +69,9 @@ void ImportLotus::Bof()
     Skip( 1 );
     Read( nFlags );
 
+    if (!pIn->good())
+        return;
+
     if( nFileSub == 0x0004 )
     {
         if( nFileCode == 0x1000 )
@@ -84,7 +87,7 @@ void ImportLotus::Bof()
 
 bool ImportLotus::BofFm3()
 {
-    sal_uInt16  nFileCode, nFileSub;
+    sal_uInt16 nFileCode(0), nFileSub(0);
 
     Read( nFileCode );
     Read( nFileSub );

Reply via email to