tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r699644 - /tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java
Date Sat, 27 Sep 2008 13:41:54 GMT
Author: markt
Date: Sat Sep 27 06:41:53 2008
New Revision: 699644

URL: http://svn.apache.org/viewvc?rev=699644&view=rev
Log:
Fix signed/unsigned conversion reported by Find Bugs

Modified:
    tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java

Modified: tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java?rev=699644&r1=699643&r2=699644&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java (original)
+++ tomcat/trunk/java/org/apache/jasper/xmlparser/ASCIIReader.java Sat Sep 27 06:41:53 2008
@@ -112,7 +112,7 @@
         }
         int count = fInputStream.read(fBuffer, 0, length);
         for (int i = 0; i < count; i++) {
-            int b0 = fBuffer[i];
+            int b0 = (0xff & fBuffer[i]); // Convert to unsigned
             if (b0 > 0x80) {
                 throw new IOException(Localizer.getMessage("jsp.error.xml.invalidASCII",
 							   Integer.toString(b0)));



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message