[ http://issues.apache.org/jira/browse/HARMONY-1513?page=comments#action_12436488 ]
Stepan Mishura commented on HARMONY-1513:
-----------------------------------------
Alexander, could you comment added check?
public static byte[] decode(byte[] in, int len) {
// approximate output length
int length = len / 4 * 3;
+ if (length == 0) {
+ return new byte[0];
+ }
It works not only for empty input (len==0) but also for len=1,2 and 3
> [classlib][luni] Base64 fails on empty input.
> ---------------------------------------------
>
> Key: HARMONY-1513
> URL: http://issues.apache.org/jira/browse/HARMONY-1513
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexander Kleymenov
> Assigned To: Stepan Mishura
> Attachments: patch-base64.txt
>
>
> Current Base64 decoding implementation fails with ArrayIndexOutOfBoundsException on empty
input.
--
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
|