mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 18:48:54 +08:00
Make deflater bad state if parsing HEADERS/PUSH_PROMISE failed
This commit is contained in:
@@ -4582,6 +4582,16 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch(iframe->frame.hd.type) {
|
||||||
|
case NGHTTP2_HEADERS:
|
||||||
|
case NGHTTP2_PUSH_PROMISE:
|
||||||
|
/* Mark inflater bad so that we won't perform further decoding */
|
||||||
|
session->hd_inflater.ctx.bad = 1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
nghttp2_inbound_frame_reset(session);
|
nghttp2_inbound_frame_reset(session);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -4714,9 +4724,6 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mark inflater bad so that we won't perform further decoding */
|
|
||||||
session->hd_inflater.ctx.bad = 1;
|
|
||||||
|
|
||||||
busy = 1;
|
busy = 1;
|
||||||
|
|
||||||
iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
|
iframe->state = NGHTTP2_IB_IGN_PAYLOAD;
|
||||||
|
|||||||
Reference in New Issue
Block a user