Skip to content

Commit d04119e

Browse files
committed
Merge r1933347 from trunk:
fix ajp_msg_check_header check git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1933348 13f79535-47bb-0310-9956-ffa450edef68
1 parent a3d3228 commit d04119e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/proxy/ajp_msg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ apr_status_t ajp_msg_check_header(ajp_msg_t *msg, apr_size_t *len)
166166
msglen = ((head[2] & 0xff) << 8);
167167
msglen += (head[3] & 0xFF);
168168

169-
if (msglen > msg->max_size) {
169+
if (msglen > (msg->max_size - AJP_HEADER_LEN)) {
170170
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(01081)
171171
"ajp_msg_check_header() incoming message is "
172172
"too big %" APR_SIZE_T_FMT ", max is %" APR_SIZE_T_FMT,
173-
msglen, msg->max_size);
173+
msglen, msg->max_size - AJP_HEADER_LEN);
174174
return AJP_ETOBIG;
175175
}
176176

0 commit comments

Comments
 (0)