You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2015/06/16 23:59:58 UTC
trafficserver git commit: TS-3697: Fix frame type check for http/2
Repository: trafficserver
Updated Branches:
refs/heads/master df0b90c5c -> 45c1133b9
TS-3697: Fix frame type check for http/2
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/45c1133b
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/45c1133b
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/45c1133b
Branch: refs/heads/master
Commit: 45c1133b9ea45003ae6491f4bd03edcf3ab8be37
Parents: df0b90c
Author: Bryan Call <bc...@apache.org>
Authored: Tue Jun 16 14:59:18 2015 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Tue Jun 16 14:59:48 2015 -0700
----------------------------------------------------------------------
proxy/http2/Http2ConnectionState.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/45c1133b/proxy/http2/Http2ConnectionState.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index c8d664d..6c26188 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -640,8 +640,8 @@ Http2ConnectionState::main_event_handler(int event, void *edata)
Http2ErrorCode error;
// Implementations MUST ignore and discard any frame that has a type that is unknown.
- ink_assert(frame->header().type < countof(frame_handlers));
- if (frame->header().type > countof(frame_handlers)) {
+ ink_assert(frame->header().type < Http2FrameType::HTTP2_FRAME_TYPE_MAX);
+ if (frame->header().type >= Http2FrameType::HTTP2_FRAME_TYPE_MAX) {
return 0;
}