Skip to content

Commit

Permalink
Merge pull request apache#469 from shinrich/ytsats-1262-2
Browse files Browse the repository at this point in the history
YTSATS-1262:  Add back in length check to fail H2 headers with no name.
  • Loading branch information
shinrich authored and GitHub Enterprise committed Jun 6, 2017
2 parents 585e345 + 9208eed commit a33b4d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proxy/http2/HTTP2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ http2_decode_header_blocks(HTTPHdr *hdr, const uint8_t *buf_start, const uint32_
if (pseudo_header_count > expected_pseudo_header_count) {
return Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR;
}
} else if (len <= 0) {
return Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR;
} else {
if (pseudo_header_count != expected_pseudo_header_count) {
return Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR;
Expand Down

0 comments on commit a33b4d1

Please sign in to comment.