mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-10 16:00:08 +00:00
BUG/MINOR: quic: Possible NULL pointer dereferencing when dumping streams.
This bug may occur when displaying streams traces. It came with this commit:
242fb1b63
("MINOR: quic: Drop packets with STREAM frames with wrong direction.").
This commit is contained in:
parent
6f97b4ef33
commit
577fe48890
@ -574,14 +574,17 @@ static void quic_trace(enum trace_level level, uint64_t mask, const struct trace
|
||||
|
||||
if (mask & QUIC_EV_CONN_PSTRM) {
|
||||
const struct quic_frame *frm = a2;
|
||||
const struct quic_stream *s = &frm->stream;
|
||||
|
||||
chunk_appendf(&trace_buf, " uni=%d fin=%d id=%llu off=%llu len=%llu",
|
||||
!!(s->id & QUIC_STREAM_FRAME_ID_DIR_BIT),
|
||||
!!(frm->type & QUIC_STREAM_FRAME_TYPE_FIN_BIT),
|
||||
(unsigned long long)s->id,
|
||||
(unsigned long long)s->offset,
|
||||
(unsigned long long)s->len);
|
||||
if (a2) {
|
||||
const struct quic_stream *s = &frm->stream;
|
||||
|
||||
chunk_appendf(&trace_buf, " uni=%d fin=%d id=%llu off=%llu len=%llu",
|
||||
!!(s->id & QUIC_STREAM_FRAME_ID_DIR_BIT),
|
||||
!!(frm->type & QUIC_STREAM_FRAME_TYPE_FIN_BIT),
|
||||
(unsigned long long)s->id,
|
||||
(unsigned long long)s->offset,
|
||||
(unsigned long long)s->len);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (mask & QUIC_EV_CONN_LPKT) {
|
||||
|
Loading…
Reference in New Issue
Block a user