Release 2.29.4

- [BUGFIX] Infinite loop in stream: returned HQ frame can be at any
  point on the list.
- [BUGFIX] Fail push promise immediately if STREAM_NOPUSH is set.
This commit is contained in:
Dmitri Tikhonov 2021-03-08 10:44:37 -05:00
parent 99a1ad0f24
commit e1b8f1a8c3
4 changed files with 13 additions and 5 deletions

View file

@ -2669,8 +2669,8 @@ static void
stream_hq_frame_put (struct lsquic_stream *stream,
struct stream_hq_frame *shf)
{
assert(STAILQ_FIRST(&stream->sm_hq_frames) == shf);
STAILQ_REMOVE_HEAD(&stream->sm_hq_frames, shf_next);
/* In vast majority of cases, the frame to put is at the head: */
STAILQ_REMOVE(&stream->sm_hq_frames, shf, stream_hq_frame, shf_next);
if (frame_in_stream(stream, shf))
memset(shf, 0, sizeof(*shf));
else
@ -5383,7 +5383,9 @@ lsquic_stream_push_promise (struct lsquic_stream *stream,
ssize_t nw;
assert(stream->sm_bflags & SMBF_IETF);
assert(lsquic_stream_can_push(stream));
if (stream->stream_flags & STREAM_NOPUSH)
return -1;
bits = vint_val2bits(promise->pp_id);
len = 1 << bits;