From 99ade09cbfc67697fca0b2560f174c5c9385063f Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 11 Apr 2022 19:47:31 +0200 Subject: [PATCH] BUILD: ssl: fix build warning with previous changes to ssl_sock_ctx Some compilers see a possible null deref after conn_get_ssl_sock_ctx() in ssl_sock_parse_heartbeat, which cannot happen there, so let's mark it as safe. No backport needed. --- src/ssl_sock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 26940dbb9..a681e253d 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -1713,6 +1713,7 @@ static void ssl_sock_parse_heartbeat(struct connection *conn, int write_p, int v const unsigned char *p = buf; unsigned int payload; + ALREADY_CHECKED(ctx); ctx->xprt_st |= SSL_SOCK_RECV_HEARTBEAT; /* Check if this is a CVE-2014-0160 exploitation attempt. */