Skip to content
Permalink
Browse files Browse the repository at this point in the history
Earlier check for settings flood
  • Loading branch information
jasnell committed May 5, 2020
1 parent 336a98f commit f8da73b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/nghttp2_session.c
Expand Up @@ -5653,6 +5653,12 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
break;
}

/* Check the settings flood counter early to be safe */
if (session->obq_flood_counter_ >= session->max_outbound_ack &&
!(iframe->frame.hd.flags & NGHTTP2_FLAG_ACK)) {
return NGHTTP2_ERR_FLOODED;
}

iframe->state = NGHTTP2_IB_READ_SETTINGS;

if (iframe->payloadleft) {
Expand Down

0 comments on commit f8da73b

Please sign in to comment.