]> git.ipfire.org Git - thirdparty/unbound.git/commit
add missing null check 395/head
authorAnton Lindqvist <anton@basename.se>
Wed, 6 Jan 2021 11:35:22 +0000 (12:35 +0100)
committerAnton Lindqvist <anton@basename.se>
Wed, 6 Jan 2021 11:44:26 +0000 (12:44 +0100)
commit422213c1719ca324faced1b4c6210a36b4c7506a
treecc364618ad91c6196f37df1e29a1a986c4dbff83
parent44075a06a5c716fe44d5c9756bc17a6f808a8748
add missing null check

I have a unbound forward zone configured on my router for my $DAYJOB.
The address associated with the zone is only accessible when the router
is connected to a VPN. If the VPN connection is absent, trying to
resolve any domain that must be handled by the zone crashes unbound.
Turns out there's a missing NULL check in `comm_point_send_udp_msg()`.
The same routine already has `if (addr) {} else {}` branches so I guess
protecting the call to `log_addr()` using the same conditional is
reasonable

I have also committed the same fix to unbound shipped with OpenBSD[1].

[1] https://marc.info/?l=openbsd-cvs&m=160993335615698&w=2
util/netevent.c