geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r696241 - /geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/Base64DecoderStream.java
Date Wed, 17 Sep 2008 11:15:19 GMT
Author: rickmcguire
Date: Wed Sep 17 04:15:18 2008
New Revision: 696241

URL: http://svn.apache.org/viewvc?rev=696241&view=rev
Log:
GERONIMO-4307 Base64DecoderStream return int value between -128 and +127, should be between
+0 and +255


Modified:
    geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/Base64DecoderStream.java

Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/Base64DecoderStream.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/Base64DecoderStream.java?rev=696241&r1=696240&r2=696241&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/Base64DecoderStream.java
(original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/org/apache/geronimo/mail/util/Base64DecoderStream.java
Wed Sep 17 04:15:18 2008
@@ -112,7 +112,8 @@
             }
         }
         decodedCount--;
-        return decodedChars[decodedIndex++];
+        // we need to ensure this doesn't get sign extended 
+        return decodedChars[decodedIndex++] & 0xff;
     }
 
     private int getBytes(byte[] data, int offset, int length) throws IOException {



Mime
View raw message