]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: ssl: always check for ssl connection before getting its XPRT context
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 10 Sep 2019 08:12:03 +0000 (10:12 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 10 Sep 2019 08:29:54 +0000 (10:29 +0200)
commit82004145d495bc3f159af06acad333fa6da4b58d
tree10b11f828066dd812bc5d8a1cb8f63f891010060
parentad6c2eac28ed96ec8e8c90bd5ce68794ea6bf000
BUG/MINOR: ssl: always check for ssl connection before getting its XPRT context

In several SSL functions, the XPRT context is retrieved before any check on the
connection. In the function ssl_sock_is_ssl(), a test suggests the connection
may be null. So, it is safer to test the ssl connection before retrieving its
XPRT context. It removes any ambiguities and prevents possible null pointer
dereferences.

This patch fixes the issue #265. It must be backported to 2.0.
src/ssl_sock.c