From 43b1739859060ff0d712b88523cd0d724c92a349 Mon Sep 17 00:00:00 2001 From: wangfuyu Date: Wed, 3 Aug 2022 03:43:40 +0800 Subject: [PATCH] m) Fix: quic server assert failed with special request (#403) Co-authored-by: wangfuyu --- src/liblsquic/lsquic_stream.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/liblsquic/lsquic_stream.c b/src/liblsquic/lsquic_stream.c index 36e1d18..0fb1856 100644 --- a/src/liblsquic/lsquic_stream.c +++ b/src/liblsquic/lsquic_stream.c @@ -1598,7 +1598,13 @@ stream_readf (struct lsquic_stream *stream, errno = EBADMSG; return -1; } - assert(stream->uh); + + if (!stream->uh) + { + LSQ_DEBUG("cannot read: headers not available"); + errno = EBADMSG; + return -1; + } } else {