Browse Source

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 2 years ago
parent
commit
850a1a582e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      daemon/dtls.c

+ 1
- 1
daemon/dtls.c View File

@ -864,7 +864,7 @@ int dtls(struct stream_fd *sfd, const str *s, const endpoint_t *fsin) {
if (!fsin) { if (!fsin) {
fsin = &ps->endpoint; fsin = &ps->endpoint;
if (fsin->port == 9)
if (fsin->port == 9 || fsin->address.family == NULL)
fsin = NULL; fsin = NULL;
} }


Loading…
Cancel
Save