serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1718001 - /serf/trunk/protocols/http2_protocol.c
Date Fri, 04 Dec 2015 17:45:22 GMT
Author: rhuijben
Date: Fri Dec  4 17:45:21 2015
New Revision: 1718001

URL: http://svn.apache.org/viewvc?rev=1718001&view=rev
Log:
* protocols/http2_protocol.c
  (http2_handle_stream_window_update,
   http2_handle_connection_window_update):
     Handle a few more cases of overflowing the connection window.

Modified:
    serf/trunk/protocols/http2_protocol.c

Modified: serf/trunk/protocols/http2_protocol.c
URL: http://svn.apache.org/viewvc/serf/trunk/protocols/http2_protocol.c?rev=1718001&r1=1718000&r2=1718001&view=diff
==============================================================================
--- serf/trunk/protocols/http2_protocol.c (original)
+++ serf/trunk/protocols/http2_protocol.c Fri Dec  4 17:45:21 2015
@@ -634,7 +634,7 @@ http2_handle_stream_window_update(void *
 
     stream->lr_window += value;
 
-    if (stream->lr_window > HTTP2_WINDOW_MAX_ALLOWED)
+    if (stream->lr_window > HTTP2_WINDOW_MAX_ALLOWED || stream->lr_window < 0)
     {
       /* A sender MUST NOT allow a flow-control window to exceed 2^31-1
          octets.  If a sender receives a WINDOW_UPDATE that causes a flow-
@@ -693,7 +693,7 @@ http2_handle_connection_window_update(vo
     was0 = (h2->lr_window == 0);
     h2->lr_window += value;
 
-    if (h2->lr_window > HTTP2_WINDOW_MAX_ALLOWED)
+    if (h2->lr_window > HTTP2_WINDOW_MAX_ALLOWED || h2->lr_window < 0)
     {
       /* A sender MUST NOT allow a flow-control window to exceed 2^31-1
          octets.  If a sender receives a WINDOW_UPDATE that causes a flow-



Mime
View raw message