[Libreoffice-commits] core.git: sc/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 30 07:30:20 UTC 2021


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

New commits:
commit 01542407d216a850cbd0894f025c598d2c8c40b5
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Aug 29 20:37:54 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 30 09:29:47 2021 +0200

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

diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 3e6756767eac..9c64fdd67393 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -87,6 +87,11 @@ ErrCode ScQProReader::readSheet( SCTAB nTab, ScDocument& rDoc, ScQProStyle *pSty
             case 0x000e:{ // Floating point cell
                 double nValue;
                 mpStream->ReadUChar( nCol ).ReadUChar( nDummy ).ReadUInt16( nRow ).ReadUInt16( nStyle ).ReadDouble( nValue );
+                if (!mpStream->good())
+                {
+                    eRet = SCERR_IMPORT_FORMAT;
+                    break;
+                }
                 nStyle = nStyle >> 3;
                 pStyle->SetFormat( &rDoc, nCol, nRow, nTab, nStyle );
                 rDoc.EnsureTable(nTab);


More information about the Libreoffice-commits mailing list