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
pull/1692/head
Richard Fuchs 3 years ago
parent 397abf4651
commit 850a1a582e

@ -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;
}

Loading…
Cancel
Save