BUG/MINOR: mux-h2: Fix possible null pointer deref on h2c in _h2_trace_header()
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 30 Jan 2023 07:26:09 +0000 (08:26 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 30 Jan 2023 07:26:12 +0000 (08:26 +0100)
commitc254516c5347052041630f9769ca1cd155d4f1d0
tree7e260abfc46f3bc6dc6f074f0fd406f5fca2ff2e
parentdf238c34c2f82e4a999dab1021608e2aecf80e8f
BUG/MINOR: mux-h2: Fix possible null pointer deref on h2c in _h2_trace_header()

As reported by Coverity, this function may be called with no h2c. Thus, the
pointer must always be checked before any access. One test was missing in
TRACE_PRINTF_LOC().

This patch should fix the issue #2015. No backport needed, except if the
commit 11e8a8c2a ("MEDIUM: mux-h2/trace: add tracing support for headers")
is backported.
src/mux_h2.c