summaryrefslogtreecommitdiffstats
path: root/dom/xslt
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-15 14:23:06 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-05-15 14:23:06 +0200
commite53fa281357edc934e6362facbcb9b065dae8e90 (patch)
treee0af527e945f1ec62e095a84d6d65626a8636955 /dom/xslt
parent5d2d2cb04363c1c2205420246f13ae60d3c354fe (diff)
downloadUXP-e53fa281357edc934e6362facbcb9b065dae8e90.tar
UXP-e53fa281357edc934e6362facbcb9b065dae8e90.tar.gz
UXP-e53fa281357edc934e6362facbcb9b065dae8e90.tar.lz
UXP-e53fa281357edc934e6362facbcb9b065dae8e90.tar.xz
UXP-e53fa281357edc934e6362facbcb9b065dae8e90.zip
Check for infinite value in txFormatNumberFunctionCall.
Diffstat (limited to 'dom/xslt')
-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 a4d4b8fb0..674fb553c 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);