projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56d3e1b
)
BUG/MINOR: quic: fix segfault on trace for version negotiation
author
Amaury Denoyelle
<adenoyelle@haproxy.com>
Thu, 18 Nov 2021 13:38:00 +0000
(14:38 +0100)
committer
Amaury Denoyelle
<adenoyelle@haproxy.com>
Fri, 19 Nov 2021 14:10:44 +0000
(15:10 +0100)
When receiving Initial packets for Version Negotiation, no quic_conn is
instantiated. Thus, on the final trace, the quic_conn dereferencement
must be tested before using it.
src/xprt_quic.c
patch
|
blob
|
history
diff --git
a/src/xprt_quic.c
b/src/xprt_quic.c
index
d1e24ba
..
a132082
100644
(file)
--- a/
src/xprt_quic.c
+++ b/
src/xprt_quic.c
@@
-3874,7
+3874,7
@@
static ssize_t qc_lstnr_pkt_rcv(unsigned char **buf, const unsigned char *end,
if (conn_ctx && HA_ATOMIC_LOAD(&conn_ctx->conn->ctx))
tasklet_wakeup(conn_ctx->wait_event.tasklet);
- TRACE_LEAVE(QUIC_EV_CONN_LPKT, qc->conn, pkt);
+ TRACE_LEAVE(QUIC_EV_CONN_LPKT, qc ? qc->conn : NULL, pkt);
return pkt->len;