changeset 8843:e39cbf4c29c3

7152169: TEST_BUG: sun/security/tools/jarsigner/ec.sh occasionally fail due to keytool error on sparc Reviewed-by: mullan
author vinnie
date Fri, 13 Apr 2012 19:00:08 +0100
parents 3ca8785e4e0d
children b01f09bcd8c7
files src/share/classes/sun/security/ec/ECParameters.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/security/ec/ECParameters.java	Sat Jul 13 16:49:00 2019 +0100
+++ b/src/share/classes/sun/security/ec/ECParameters.java	Fri Apr 13 19:00:08 2012 +0100
@@ -87,8 +87,8 @@
         if ((data.length == 0) || (data[0] != 4)) {
             throw new IOException("Only uncompressed point format supported");
         }
-        int n = (curve.getField().getFieldSize() + 7 ) >> 3;
-        if (data.length != (n * 2) + 1) {
+        int n = data.length / 2;
+        if (n > ((curve.getField().getFieldSize() + 7 ) >> 3)) {
             throw new IOException("Point does not match field size");
         }
         byte[] xb = new byte[n];