7152169: TEST_BUG: sun/security/tools/jarsigner/ec.sh occasionally fail due to keytool error on sparc
Reviewed-by: mullan
--- a/jdk/src/share/classes/sun/security/ec/ECParameters.java Fri Apr 13 09:49:41 2012 -0400
+++ b/jdk/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];