aboutsummaryrefslogtreecommitdiffstats
path: root/java/openjdk7/files
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2011-02-10 01:13:40 +0800
committerglewis <glewis@FreeBSD.org>2011-02-10 01:13:40 +0800
commite4ddfbfefe0ca05674e6b664f0cb1c8ba731da4c (patch)
tree15508563d3d541f5ed67b504de652f83c03f931f /java/openjdk7/files
parent8777f4fec4598d75ce28a78d51213b57286e995a (diff)
downloadfreebsd-ports-gnome-e4ddfbfefe0ca05674e6b664f0cb1c8ba731da4c.tar.gz
freebsd-ports-gnome-e4ddfbfefe0ca05674e6b664f0cb1c8ba731da4c.tar.zst
freebsd-ports-gnome-e4ddfbfefe0ca05674e6b664f0cb1c8ba731da4c.zip
. Fix infinite loop in parsing certain doubles. See CVE-2010-4476.
Diffstat (limited to 'java/openjdk7/files')
-rw-r--r--java/openjdk7/files/patch-FloatingDecimal.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/java/openjdk7/files/patch-FloatingDecimal.java b/java/openjdk7/files/patch-FloatingDecimal.java
new file mode 100644
index 000000000000..23656900f75c
--- /dev/null
+++ b/java/openjdk7/files/patch-FloatingDecimal.java
@@ -0,0 +1,11 @@
+--- jdk/src/share/classes/sun/misc/FloatingDecimal.java.orig 2010-06-21 14:15:30.000000000 -0700
++++ jdk/src/share/classes/sun/misc/FloatingDecimal.java 2011-02-08 22:30:49.000000000 -0800
+@@ -1547,7 +1547,7 @@
+ if ( (cmpResult = bigB.cmp( bigD ) ) > 0 ){
+ overvalue = true; // our candidate is too big.
+ diff = bigB.sub( bigD );
+- if ( (bigIntNBits == 1) && (bigIntExp > -expBias) ){
++ if ( (bigIntNBits == 1) && (bigIntExp > -expBias+1) ){
+ // candidate is a normalized exact power of 2 and
+ // is too big. We will be subtracting.
+ // For our purposes, ulp is the ulp of the