bug 1194818 - h2 header priority handling r=hurley

This commit is contained in:
Patrick McManus 2015-08-18 14:57:07 -04:00
Родитель 8809ddec9b
Коммит 4f2eaec422
1 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -1152,9 +1152,12 @@ Http2Session::ParsePadding(uint8_t &paddingControlBytes, uint16_t &paddingLength
if (mInputFrameFlags & kFlag_PADDED) {
paddingLength = *reinterpret_cast<uint8_t *>(mInputFrameBuffer + kFrameHeaderBytes);
paddingControlBytes = 1;
} else {
paddingLength = 0;
paddingControlBytes = 0;
}
if (paddingLength > mInputFrameDataSize) {
if ((paddingLength + paddingControlBytes) > mInputFrameDataSize) {
// This is fatal to the session
LOG3(("Http2Session::ParsePadding %p stream 0x%x PROTOCOL_ERROR "
"paddingLength %d > frame size %d\n",
@ -1212,6 +1215,11 @@ Http2Session::RecvHeaders(Http2Session *self)
paddingLength,
self->mInputFrameFlags & kFlag_PADDED));
if ((paddingControlBytes + priorityLen + paddingLength) > self->mInputFrameDataSize) {
// This is fatal to the session
RETURN_SESSION_ERROR(self, PROTOCOL_ERROR);
}
if (!self->mInputFrameDataStream) {
// Cannot find stream. We can continue the session, but we need to
// uncompress the header block to maintain the correct compression context