Check explicitly that padding field is really read

This commit is contained in:
Tatsuhiro Tsujikawa 2014-08-24 22:29:05 +09:00
parent d5da7611fa
commit 1093b3eeab
1 changed files with 4 additions and 2 deletions

View File

@ -5114,6 +5114,10 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
readlen, iframe->payloadleft,
nghttp2_buf_mark_avail(&iframe->sbuf)));
if(nghttp2_buf_mark_avail(&iframe->sbuf)) {
return in - first;
}
/* Pad Length field is subject to flow control */
rv = session_update_recv_connection_window_size(session, readlen);
if(nghttp2_is_fatal(rv)) {
@ -5140,8 +5144,6 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
}
}
assert(nghttp2_buf_mark_avail(&iframe->sbuf) == 0);
busy = 1;
padlen = inbound_frame_compute_pad(iframe);