Skip to content

Commit

Permalink
UNDERTOW-546 Possible ArrayIndexOutOfBoundsException in HTTP2 HPACK i…
Browse files Browse the repository at this point in the history
…mplementation
  • Loading branch information
stuartwdouglas committed Sep 21, 2015
1 parent 33d191c commit acf236b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/io/undertow/protocols/http2/Hpack.java
Expand Up @@ -151,6 +151,9 @@ static int decodeInteger(ByteBuffer source, int n) throws HpackException {
if (source.remaining() == 0) {
return -1;
}
if(n >= PREFIX_TABLE.length) {
throw UndertowMessages.MESSAGES.integerEncodedOverTooManyOctets(MAX_INTEGER_OCTETS);
}
int count = 1;
int sp = source.position();
int mask = PREFIX_TABLE[n];
Expand Down

0 comments on commit acf236b

Please sign in to comment.