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

           Summary: MsgAjp dump method does not dump packet when being
                    written
           Product: Tomcat 6
           Version: 6.0.16
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: ErrorMessage
          Severity: minor
          Priority: P4
         Component: Native:JK
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


In org.apache.jk.common.MsgAjp, the dump method is a debug utility to provide
debug output of the buffer contents when errors occur.  It uses the "len"
variable to control this output.  This probably works fine in the case of a
packet read.  But in the case of a packet write, the "len" variable is not set
until then "end" method is called once the packet is complete.  In the case of
an error during the generation of the packet to be written (such as a buffer
overflow in our case), the code such as cpBytes calls "dump" to display the
contents of the buffer.  Since "end" has not been called, "len" still equals 4
and so only the first 8 bytes of the buffer are dumped followed by blank hex
lines for the rest of the buffer up to the pos/max limit.  Obviously, this
would be more useful if the "len" was ignored and "pos" was used instead.  Or
"cpBytes" could call the "end" method before calling "dump" to set the "len"
value.  I'm sure there are a couple of ways to fix this and I am not familiar
enough with the code to pick the best fix.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to