https://issues.apache.org/bugzilla/show_bug.cgi?id=47225

           Summary: Wrong argument in redirectPath.setChars in
                    Mapper.internalMapWrapper()
           Product: Tomcat 6
           Version: 6.0.18
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: knst.koli...@gmail.com


Found in current trunk and tc6.0.x, and tc5.5.x:

http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java?annotate=734728&pathrev=770809

730 :                  if(mappingData.wrapper == null && noServletPath) {
731 :                 // The path is empty, redirect to "/"
732 :                 mappingData.redirectPath.setChars
733 :                 (path.getBuffer(), pathOffset, pathEnd);
734 :                 path.setEnd(pathEnd - 1);
735 :                 return;
736 :                 }

On line 733 the pathEnd argument is wrong:
it should be length, not an index.

It should be
 mappingData.redirectPath.setChars(path.getBuffer(), pathOffset,
pathEnd-pathOffset);

Do not know, why there are no complaints. May be pathOffset is always zero?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

Reply via email to