[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sc/source

Markus Mohrhard markus.mohrhard at googlemail.com
Thu Mar 24 13:34:42 UTC 2016


 sc/source/filter/excel/xilink.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit cb47752029f0a2b84ed9020a24eb65e11cd32a63
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Mar 24 12:42:52 2016 +0100

    don't sanitize value to an insane value, tdf#97863
    
    Change-Id: I0e4de6b676fb61536dadefc96a719cf50be128ed
    Reviewed-on: https://gerrit.libreoffice.org/23486
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index 7b7ec4b..ab9dca3 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -282,7 +282,10 @@ XclImpExtName::MOper::MOper(svl::SharedStringPool& rPool, XclImpStream& rStrm) :
     {
         SAL_WARN("sc", "Parsing error: " << nMaxRows <<
                  " max possible rows, but " << nLastRow << " index claimed, truncating");
-        nLastRow = nMaxRows-1;
+        if (nMaxRows > 0)
+            nLastRow = nMaxRows-1;
+        else
+            return;
     }
 
     mxCached->Resize(nLastCol+1, nLastRow+1);


More information about the Libreoffice-commits mailing list