]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: ssl: add an unchecked version of __conn_get_ssl_sock_ctx()
authorWilly Tarreau <w@1wt.eu>
Tue, 12 Apr 2022 05:31:06 +0000 (07:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 12 Apr 2022 05:33:26 +0000 (07:33 +0200)
commit3a0a0d6cc15feaaec3dc6f953c39d251c7356490
tree84f905b216a36cd2e39a9e6f0e3275ee5ab56861
parent99ade09cbfc67697fca0b2560f174c5c9385063f
BUILD: ssl: add an unchecked version of __conn_get_ssl_sock_ctx()

First gcc, then now coverity report possible null derefs in situations
where we know these cannot happen since we call the functions in
contexts that guarantee the existence of the connection and the method
used. Let's introduce an unchecked version of the function for such
cases, just like we had to do with objt_*. This allows us to remove the
ALREADY_CHECKED() statements (which coverity doesn't see), and addresses
github issues #1643, #1644, #1647.
include/haproxy/connection.h
src/ssl_sock.c