You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by "Thomas Leonard (JIRA)" <ji...@apache.org> on 2006/08/01 15:45:15 UTC
[jira] Updated: (WSS-52) ArrayIndexOutOfBoundsException if
certs.length > 1
[ http://issues.apache.org/jira/browse/WSS-52?page=all ]
Thomas Leonard updated WSS-52:
------------------------------
Attachment: wshandler2.patch
Presumably this is what was meant. It is exactly equivalent to the old code in the only previously-working case of certs.length == 1.
> ArrayIndexOutOfBoundsException if certs.length > 1
> --------------------------------------------------
>
> Key: WSS-52
> URL: http://issues.apache.org/jira/browse/WSS-52
> Project: WSS4J
> Issue Type: Bug
> Reporter: Thomas Leonard
> Assigned To: Davanum Srinivas
> Attachments: wshandler2.patch
>
>
> In WSHandler.java we have (revision 427569):
> X509Certificate[] x509certs = new X509Certificate[certs.length + 1];
> // Then add the first certificate ...
> x509certs[0] = cert;
> // ... and the other certificates
> for (int j = 0; j < certs.length; j++) {
> cert = certs[i];
> x509certs[certs.length + j] = cert;
> }
> So, the highest index available in x509certs is "certs.length", while the highest index we write to is "certs.length * 2 - 1".
> This code will only work if certs.length < 2.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org