On 24/07/2019 13:32, Mark Thomas wrote: > On 24/07/2019 09:18, jean-frederic clere wrote:
<snip/> >> Something like: >> +++ >> index 637e690c65..255883fb93 100644 >> --- a/java/org/apache/coyote/http2/HPackHuffman.java >> +++ b/java/org/apache/coyote/http2/HPackHuffman.java >> @@ -380,7 +380,8 @@ public class HPackHuffman { >> int treePos = 0; >> boolean eosBits = true; >> int eosBitCount = 0; >> - for (int i = 0; i < length; ++i) { >> + int i = 0; >> + for (; i < length; ++i) { > > Note sure why the above is necessary. > >> byte b = data.get(); >> int bitPos = 7; >> while (bitPos >= 0) { >> @@ -406,6 +407,9 @@ public class HPackHuffman { >> } else { >> target.append((char) ((val >> 16) & LOW_MASK)); >> treePos = 0; >> + if (eosBitCount != 0) { >> + throw new HpackException("Oops... JFC"); >> + } >> eosBits = true; >> } >> } >> +++ >> Seems to make the test suite happy, comments? I can reproduce the failure and can confirm that the fix is correct. My local copy has an i18n message so I intend to commit that (with credit to you) shortly. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org