You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/03/06 18:49:36 UTC
[Bug 57638] IllegalArgumentException in AjpNioProcessor when
packetSize > 8192
https://bz.apache.org/bugzilla/show_bug.cgi?id=57638
--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> ---
What version the stacktrace is from?
> at java.nio.Buffer.limit(Buffer.java:275)
The line matches Java 8u31 sources.
The IAE is triggered by the following check:
[[[
public final Buffer limit(int newLimit) {
if ((newLimit > capacity) || (newLimit < 0))
throw new IllegalArgumentException();
]]]
> org.apache.coyote.ajp.AjpNioProcessor.readSocket(AjpNioProcessor.java:179)
The above does not match Tomcat 7 sources. By method name I guess that is line
356.
[[[
private int readSocket(byte[] buf, int pos, int n, boolean block)
throws IOException {
int nRead = 0;
ByteBuffer readBuffer =
socketWrapper.getSocket().getBufHandler().getReadBuffer();
readBuffer.clear();
readBuffer.limit(n);
]]]
Apparently it tries to read n bytes from the Socket read buffer at once. The
buffer is smaller that that thus the IAE.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org