From 850a1a582e3fe48845355561d3ae778491a1b984 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 6 Jul 2023 08:29:56 -0400 Subject: [PATCH] MT#57820 fix possible NULL deref Don't attempt to send packets to an endpoint address that is empty and hasn't been initialised. Change-Id: Iabeb034ebfc56fc49083c6a10a85b92c6983eebc --- daemon/dtls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/dtls.c b/daemon/dtls.c index a40dfd5ad..ae530c57b 100644 --- a/daemon/dtls.c +++ b/daemon/dtls.c @@ -864,7 +864,7 @@ int dtls(struct stream_fd *sfd, const str *s, const endpoint_t *fsin) { if (!fsin) { fsin = &ps->endpoint; - if (fsin->port == 9) + if (fsin->port == 9 || fsin->address.family == NULL) fsin = NULL; }