[jboss-jira] [JBoss JIRA] Created: (JBWEB-165) readLine in CoyoteReader can cause infinite loop reading strings longer than 4096 characters

Neil Eades (JIRA) jira-events at lists.jboss.org
Wed Apr 14 09:11:45 EDT 2010


readLine in CoyoteReader can cause infinite loop reading strings longer than 4096 characters
--------------------------------------------------------------------------------------------

                 Key: JBWEB-165
                 URL: https://jira.jboss.org/jira/browse/JBWEB-165
             Project: JBoss Web
          Issue Type: Bug
      Security Level: Public (Everyone can see)
    Affects Versions: JBossWeb-2.1.6.GA
         Environment: Ubuntu 2.6.31-14-generic-pae, Java 1.6.0_15, JBoss 5.1.0.GA
            Reporter: Neil Eades
            Assignee: Remy Maucherat


If you post a request with a body containing a line longer than 4096 characters, and then try to read the string using readLine on the BufferedReader obtained from the HttpRequest (an instance of org.apache.catalina.connector.CoyoteReader), then you will enter an infinite loop.

This appears to be cause by the change applied in revision 720.

This changed line 159 as follows:

159	                 if (nRead < 0) {	                 if (nRead < 0 && aggregator == null) {
160	                     if (pos == 0) {	                     if (pos == 0) {
161	                         return null;	                         return null;
162	                     }	                     }


I believe this should have been a modification to line 160, (as made in the apache  repositories)

159	                 if (nRead < 0) {	                 if (nRead < 0) {
160	                     if (pos == 0) {	                     if (pos == 0 && aggregator == null) {
161	                         return null;	                         return null;
162	                     }	                     }




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list