Author: remm Date: Wed Mar 29 14:09:30 2017 New Revision: 1789371 URL: http://svn.apache.org/viewvc?rev=1789371&view=rev Log: Revert due to test failures, maybe it's good to identify the issue with a specific exception.
Modified: tomcat/trunk/java/org/apache/coyote/http2/HpackDecoder.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/coyote/http2/HpackDecoder.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/HpackDecoder.java?rev=1789371&r1=1789370&r2=1789371&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/coyote/http2/HpackDecoder.java (original) +++ tomcat/trunk/java/org/apache/coyote/http2/HpackDecoder.java Wed Mar 29 14:09:30 2017 @@ -244,11 +244,11 @@ public class HpackDecoder { throw new HpackException(); } int adjustedIndex = getRealIndex(index - Hpack.STATIC_TABLE_LENGTH); - Hpack.HeaderField headerField = headerTable[adjustedIndex]; - if (headerField == null) { + Hpack.HeaderField res = headerTable[adjustedIndex]; + if (res == null) { throw new HpackException(); } - return headerField.name; + return res.name; } } @@ -262,14 +262,8 @@ public class HpackDecoder { if (index <= Hpack.STATIC_TABLE_LENGTH) { addStaticTableEntry(index); } else { - if (index >= Hpack.STATIC_TABLE_LENGTH + filledTableSlots) { - throw new HpackException(); - } int adjustedIndex = getRealIndex(index - Hpack.STATIC_TABLE_LENGTH); Hpack.HeaderField headerField = headerTable[adjustedIndex]; - if (headerField == null) { - throw new HpackException(); - } emitHeader(headerField.name, headerField.value); } } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1789371&r1=1789370&r2=1789371&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar 29 14:09:30 2017 @@ -54,14 +54,6 @@ </update> </changelog> </subsection> - <subsection name="Coyote"> - <changelog> - <fix> - Cleanup possible index out of bounds exception processing an invalid - index in HPACK. (remm) - </fix> - </changelog> - </subsection> </section> <section name="Tomcat 9.0.0.M19 (markt)" rtext="release in progress"> <subsection name="Catalina"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org