You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2017/05/31 04:44:48 UTC

[trafficserver] branch master updated: Add range check of Http2SettingsIdentifier

This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  c2bc17d   Add range check of Http2SettingsIdentifier
c2bc17d is described below

commit c2bc17d665ccd70e7e33ca3c456f2e4146ea20a6
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Tue May 30 15:50:02 2017 +0900

    Add range check of Http2SettingsIdentifier
---
 proxy/http2/Http2ConnectionState.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index 3ba9af4..05e9895 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -69,7 +69,7 @@ public:
   unsigned
   get(Http2SettingsIdentifier id) const
   {
-    if (id < HTTP2_SETTINGS_MAX) {
+    if (0 < id && id < HTTP2_SETTINGS_MAX) {
       return this->settings[indexof(id)];
     } else {
       ink_assert(!"Bad Settings Identifier");
@@ -95,7 +95,7 @@ private:
   static unsigned
   indexof(Http2SettingsIdentifier id)
   {
-    ink_assert(id < HTTP2_SETTINGS_MAX);
+    ink_assert(0 < id && id < HTTP2_SETTINGS_MAX);
 
     return id - 1;
   }

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].