mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-08 02:58:53 +08:00
Treat delta 0 WINDOW_UPDATE as error
This commit is contained in:
@@ -3732,7 +3732,8 @@ static int session_on_connection_window_update_received
|
|||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
/* Handle connection-level flow control */
|
/* Handle connection-level flow control */
|
||||||
if(NGHTTP2_MAX_WINDOW_SIZE - frame->window_update.window_size_increment <
|
if(frame->window_update.window_size_increment == 0 ||
|
||||||
|
NGHTTP2_MAX_WINDOW_SIZE - frame->window_update.window_size_increment <
|
||||||
session->remote_window_size) {
|
session->remote_window_size) {
|
||||||
return session_handle_invalid_connection
|
return session_handle_invalid_connection
|
||||||
(session, frame, NGHTTP2_FLOW_CONTROL_ERROR, NULL);
|
(session, frame, NGHTTP2_FLOW_CONTROL_ERROR, NULL);
|
||||||
@@ -3771,7 +3772,8 @@ static int session_on_stream_window_update_received
|
|||||||
(session, frame, NGHTTP2_PROTOCOL_ERROR,
|
(session, frame, NGHTTP2_PROTOCOL_ERROR,
|
||||||
"WINDOW_UPADATE to reserved stream");
|
"WINDOW_UPADATE to reserved stream");
|
||||||
}
|
}
|
||||||
if(NGHTTP2_MAX_WINDOW_SIZE - frame->window_update.window_size_increment <
|
if(frame->window_update.window_size_increment == 0 ||
|
||||||
|
NGHTTP2_MAX_WINDOW_SIZE - frame->window_update.window_size_increment <
|
||||||
stream->remote_window_size) {
|
stream->remote_window_size) {
|
||||||
return session_handle_invalid_stream(session, frame,
|
return session_handle_invalid_stream(session, frame,
|
||||||
NGHTTP2_FLOW_CONTROL_ERROR);
|
NGHTTP2_FLOW_CONTROL_ERROR);
|
||||||
|
|||||||
Reference in New Issue
Block a user