Backed out changeset af935eae9bed (bug 1194818) for Windows build bustage.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 31 Aug 2015 18:33:47 -0400
changeset 260237 d773e076ec4a525cc01800f3d5a6f9dad3ce9696
parent 260236 daf3c7087ab24e2216a266ea804f0bbf0b9f052c
child 260238 8d9743e32b80c45609c464ff0e6b29396443235f
push id29304
push usercbook@mozilla.com
push dateTue, 01 Sep 2015 12:32:25 +0000
treeherdermozilla-central@dd509db16a13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1194818
milestone43.0a1
backs outaf935eae9bedb1a65fd19d0329f94d18c0c87875
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset af935eae9bed (bug 1194818) for Windows build bustage. CLOSED TREE
netwerk/protocol/http/Http2Session.cpp
--- a/netwerk/protocol/http/Http2Session.cpp
+++ b/netwerk/protocol/http/Http2Session.cpp
@@ -1147,22 +1147,19 @@ Http2Session::SetInputFrameDataStream(ui
 }
 
 nsresult
 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 + paddingControlBytes) > mInputFrameDataSize) {
+  if (paddingLength > mInputFrameDataSize) {
     // This is fatal to the session
     LOG3(("Http2Session::ParsePadding %p stream 0x%x PROTOCOL_ERROR "
           "paddingLength %d > frame size %d\n",
           this, mInputFrameID, paddingLength, mInputFrameDataSize));
     RETURN_SESSION_ERROR(this, PROTOCOL_ERROR);
   }
 
   return NS_OK;
@@ -1210,21 +1207,16 @@ Http2Session::RecvHeaders(Http2Session *
         "paddingLength=%d padded=%d\n",
         self, self->mInputFrameID, priorityLen, self->mInputFrameDataStream,
         self->mInputFrameFlags & kFlag_END_STREAM,
         self->mInputFrameFlags & kFlag_END_HEADERS,
         self->mInputFrameFlags & kFlag_PRIORITY,
         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
 
     LOG3(("Http2Session::RecvHeaders %p lookup mInputFrameID stream "
           "0x%X failed. NextStreamID = 0x%X\n",
           self, self->mInputFrameID, self->mNextStreamID));