starmath/inc/parse.hxx | 2 +- starmath/source/mathtype.cxx | 2 +- starmath/source/node.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit 6afb78d3dd130a513c2dd0bee924a3775fcf0b97 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jan 11 17:22:09 2018 +0000 ofz#5244 tighten depth check Change-Id: Ia841f3419ebe14d8f73d09a6fc089973252725ff Reviewed-on: https://gerrit.libreoffice.org/47770 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx index 5d1eeef553d4..d5e014e6717b 100644 --- a/starmath/inc/parse.hxx +++ b/starmath/inc/parse.hxx @@ -53,7 +53,7 @@ class SmParser { ++m_rParseDepth; } - bool TooDeep() const { return m_rParseDepth > 2048; } + bool TooDeep() const { return m_rParseDepth > 1024; } ~DepthProtect() { --m_rParseDepth; diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index da040887adc2..402a75f0a613 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -647,7 +647,7 @@ bool MathType::HandleRecords(int nLevel, sal_uInt8 nSelector, sal_uInt8 nVariation, int nMatrixRows, int nMatrixCols) { //depth-protect - if (nLevel > 2048) + if (nLevel > 1024) return false; sal_uInt8 nTag,nRecord; diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index d316e9228023..b7a138e2da9b 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -219,7 +219,7 @@ void SmNode::PrepareAttributes() void SmNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell, int nDepth) { - if (nDepth > 2048) + if (nDepth > 1024) throw std::range_error("parser depth limit"); mbIsPhantom = false; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits