Skip to content

Commit a3d3228

Browse files
committed
Merge r1933344 from trunk:
fix ajp_parse_data message len check +lognos git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1933346 13f79535-47bb-0310-9956-ffa450edef68
1 parent b8def8f commit a3d3228

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

modules/proxy/ajp_header.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,11 @@ apr_status_t ajp_parse_data(request_rec *r, ajp_msg_t *msg,
835835
* 1 : The last byte of this message always seems to be
836836
* 0x00 and is not part of the chunk.
837837
*/
838+
if (msg->len < AJP_HEADER_LEN + AJP_HEADER_SZ_LEN + 1 + 1) {
839+
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10546)
840+
"ajp_parse_data: Message too small");
841+
return AJP_EBAD_HEADER;
842+
}
838843
expected_len = msg->len - (AJP_HEADER_LEN + AJP_HEADER_SZ_LEN + 1 + 1);
839844
if (*len != expected_len) {
840845
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00998)

0 commit comments

Comments
 (0)