summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPale Moon <git-repo@palemoon.org>2018-05-15 16:56:57 +0200
committerPale Moon <git-repo@palemoon.org>2018-05-15 16:56:57 +0200
commita103f2051b1cdfd148c100fd24633ccc197c84c5 (patch)
treeb41f4cbd659a84ad47b10fa487971a3eefb2389d
parentae00f8b0791befcb1c1dd7428e98887da9bad969 (diff)
downloadpalemoon-gre-a103f2051b1cdfd148c100fd24633ccc197c84c5.tar.gz
Check for infinite value in txFormatNumberFunctionCall.
-rw-r--r--dom/xslt/xslt/txFormatNumberFunctionCall.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/dom/xslt/xslt/txFormatNumberFunctionCall.cpp b/dom/xslt/xslt/txFormatNumberFunctionCall.cpp
index c41b81ab1..e51ac3f25 100644
--- a/dom/xslt/xslt/txFormatNumberFunctionCall.cpp
+++ b/dom/xslt/xslt/txFormatNumberFunctionCall.cpp
@@ -265,6 +265,12 @@ txFormatNumberFunctionCall::evaluate(txIEvalContext* aContext,
value = fabs(value) * multiplier;
+ // Make sure the multiplier didn't push value to infinity.
+ if (value == mozilla::PositiveInfinity<double>()) {
+ return aContext->recycler()->getStringResult(format->mInfinity,
+ aResult);
+ }
+
// Prefix
nsAutoString res(prefix);