This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 36b1a02763 Fix AJP message length check
36b1a02763 is described below
commit 36b1a02763f29e95651dd499fb3423f658dbaa75
Author: remm <[email protected]>
AuthorDate: Mon Nov 3 10:03:23 2025 +0100
Fix AJP message length check
PR#916 by Joshua Rogers.
---
java/org/apache/coyote/ajp/AjpProcessor.java | 2 +-
webapps/docs/changelog.xml | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java
b/java/org/apache/coyote/ajp/AjpProcessor.java
index 53fb933336..5b34b5a6a4 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -569,7 +569,7 @@ public class AjpProcessor extends AbstractProcessor {
// Zero length message.
return true;
} else {
- if (messageLength > message.getBuffer().length) {
+ if (messageLength > (buf.length - Constants.H_SIZE)) {
// Message too long for the buffer
// Need to trigger a 400 response
String msg = sm.getString("ajpprocessor.header.tooLong",
Integer.valueOf(messageLength),
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index adc090f6e7..7a44121ed3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -127,6 +127,10 @@
Fix potential crash on shutdown when a Connector depends on the Tomcat
Native library. (markt)
</fix>
+ <fix>
+ Fix AJP message length check. Pull request <pr>916</pr> by Joshua
+ Rogers. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]