[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Mon Nov 27 20:40:35 UTC 2017
sc/source/filter/lotus/lotread.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 6160ac241b1f54ddb2b2b444da14fe31878a5bc7
Author: Eike Rathke <erack at redhat.com>
Date: Mon Nov 27 21:39:22 2017 +0100
ofz#4412 do not read past end of file
Change-Id: Id1d9e83a931fda3921948206cf927b2c20d88173
diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx
index 7878c97288c0..b21cbbb66bca 100644
--- a/sc/source/filter/lotus/lotread.cxx
+++ b/sc/source/filter/lotus/lotread.cxx
@@ -62,7 +62,12 @@ ErrCode ImportLotus::Read()
pIn->ReadUInt16( nOp ).ReadUInt16( nRecLen );
if (!pIn->good() || nNextRec > SAL_MAX_UINT32 - nRecLen - 4)
+ {
+ eRet = SCERR_IMPORT_FORMAT;
eAkt = S_END;
+ if (!pIn->good())
+ break; // while
+ }
nNextRec += nRecLen + 4;
More information about the Libreoffice-commits
mailing list