sc/source/filter/lotus/lotimpop.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 406c40a21537e5f3a4050e4ad1fcac2465d3c4c2 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Aug 28 09:56:52 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Aug 31 13:12:44 2021 +0200 ofz: MemorySanitizer: use-of-uninitialized-value Change-Id: I649e8b8fa0d1752f0f4b0b6b688cea8ae945bb87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121153 Tested-by: Caolán McNamara <caol...@redhat.com> 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 );