diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-24 12:42:52 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-05-02 19:40:49 +0200 |
commit | 292e525d287d97868b06f37732079128ae0ee2fa (patch) | |
tree | 47f4424fc9c0d6d6cc879685dc2bdea2d92a24ed | |
parent | c2064f99b97f9d7e3806c09d3eb0df8eae257c86 (diff) |
don't sanitize value to an insane value, tdf#97863
Change-Id: I0e4de6b676fb61536dadefc96a719cf50be128ed
(cherry picked from commit 6aa836329d17bf0aca4aead6bb9c35a6783ec215)
-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 fce7ba4edc5c..73c5829f614b 100644 --- a/sc/source/filter/excel/xilink.cxx +++ b/sc/source/filter/excel/xilink.cxx @@ -283,7 +283,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); |