DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15538>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15538

ASCIIReader allows bytes outside of 0x00-0x7F range





------- Additional Comments From [EMAIL PROTECTED]  2002-12-19 17:42 -------
InputStream#read() returns an int from 0 to 255 for legal values and -1 for 
errors.  I would suggest the first change should simply be to fix the "fence-
post" error, i.e. change

-        if (b0 > 0x80) {
+        if (b0 >= 0x80) {

In the second case where the int is loaded from the byte array, an even simpler 
check will suffice (and addresses the same off by one error):

-            if (b0 > 0x80) {
+            if (b0 < 0) {

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to