[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Thu Feb 1 18:02:57 UTC 2018
sc/source/filter/qpro/qpro.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 1698425c6e2341835aef8c405c06482d4d78d73a
Author: Eike Rathke <erack at redhat.com>
Date: Thu Feb 1 19:01:31 2018 +0100
Check for end-of-stream after reading formula headers
Change-Id: I0de0ceeda63d733779aa595bdbd0f2be97827694
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 13bb055e1c3a..3d663a515000 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -101,6 +101,11 @@ ErrCode ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSty
double nValue;
sal_uInt16 nState, nLen;
mpStream->ReadUChar( nCol ).ReadUChar( nDummy ).ReadUInt16( nRow ).ReadUInt16( nStyle ).ReadDouble( nValue ).ReadUInt16( nState ).ReadUInt16( nLen );
+ if (!mpStream->good())
+ {
+ eRet = SCERR_IMPORT_FORMAT;
+ break;
+ }
ScAddress aAddr( nCol, nRow, nTab );
const ScTokenArray *pArray;
More information about the Libreoffice-commits
mailing list