ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54460] New: Base64Converter not properly handling bytes with MSB set (not masking byte to int conversion)
Date Tue, 22 Jan 2013 01:41:04 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54460

            Bug ID: 54460
           Summary: Base64Converter not properly handling bytes with MSB
                    set (not masking byte to int conversion)
           Product: Ant
           Version: 1.8.4
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: notifications@ant.apache.org
          Reporter: apache-bugzilla@brettingham-moore.net
    Classification: Unclassified

Created attachment 29875
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29875&action=edit
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;

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message