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

Konstantin Kolinko <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #4 from Konstantin Kolinko <[email protected]> ---
The following lines in ChunkedInputFilter.java (162-164 in trunk)

        if (pos >= lastValid) {
            readBytes();
        }

is the only place in this file where the return value of "readBytes()" is not
checked. 

Looking at the code, if the method returns -1 then (lastValid - pos) will be -1
and it will proceed with "chunk.setBytes(buf, pos, result);", which seems a
wrong thing to do in such a case.

I have not tested what is the actual behaviour here, but an explicit "return
-1" or "throw new EOFException()" would be better.

-- 
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