trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject trafficserver git commit: TS-3697: Fix frame type check for http/2
Date Tue, 16 Jun 2015 21:59:58 GMT
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 <bcall@apache.org>
Authored: Tue Jun 16 14:59:18 2015 -0700
Committer: Bryan Call <bcall@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;
     }
 


Mime
View raw message