]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Don't pass a NULL pointer to isc_sockaddr_format()
authorAram Sargsyan <aram@isc.org>
Wed, 28 Dec 2022 12:10:09 +0000 (12:10 +0000)
committerAram Sargsyan <aram@isc.org>
Wed, 28 Dec 2022 12:10:09 +0000 (12:10 +0000)
The 'localaddr' pointer can be NULL, which causes an assertion failure.

Use '&disp->local' instead when printing a debug log message.

lib/dns/dispatch.c

index d7dea130c992f11255d936827fc726f4771be69f..c1dbff4c782f04062d37e95a73a5be403bc020f0 100644 (file)
@@ -1211,7 +1211,7 @@ dns_dispatch_createtcp(dns_dispatchmgr_t *mgr, const isc_sockaddr_t *localaddr,
        if (isc_log_wouldlog(dns_lctx, 90)) {
                char addrbuf[ISC_SOCKADDR_FORMATSIZE];
 
-               isc_sockaddr_format(localaddr, addrbuf,
+               isc_sockaddr_format(&disp->local, addrbuf,
                                    ISC_SOCKADDR_FORMATSIZE);
 
                mgr_log(mgr, LVL(90),