Summary: | Base64Converter not properly handling bytes with MSB set (not masking byte to int conversion) | ||
---|---|---|---|
Product: | Ant | Reporter: | Clive Brettingham-Moore <apache-bugzilla> |
Component: | Core | Assignee: | Ant Notifications List <notifications> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jglick |
Priority: | P2 | Keywords: | PatchAvailable |
Version: | 1.8.4 | ||
Target Milestone: | 1.9.0 | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | svn diff against trunk. |
Thanks for the report and the patch, now submitted in subversion revision 1437268. |
Created attachment 29875 [details] svn diff against trunk. Base64Converter not properly bytes with MSB set (not masking byte to int conversion). Every 3rd byte taken for conversion (least significant in triplet is not being masked with added to integer, if the msb is set this leads to a signed extension which overwrites the previous two bytes with all ones. bits24 |= octetString[i++]; Should be: bits24 |= octetString[i++] & BYTE_MASK;