diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-24 12:42:52 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-03-24 13:34:12 +0000 |
commit | cb47752029f0a2b84ed9020a24eb65e11cd32a63 (patch) | |
tree | af521b6bea6ee2b7cd99b3d274acd6b23b2ae1f0 | |
parent | 90b9a99cb242ebb5e8372372457f6c74d17bc409 (diff) |
don't sanitize value to an insane value, tdf#97863
Change-Id: I0e4de6b676fb61536dadefc96a719cf50be128ed
Reviewed-on: https://gerrit.libreoffice.org/23486
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sc/source/filter/excel/xilink.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx index 7b7ec4bc3563..ab9dca36d2d8 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); |