sc/source/filter/qpro/qpro.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 1698425c6e2341835aef8c405c06482d4d78d73a
Author: Eike Rathke <er...@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;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to