Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing null check #395

Merged
merged 1 commit into from
Jan 6, 2021
Merged

add missing null check #395

merged 1 commit into from
Jan 6, 2021

Conversation

mptre
Copy link
Contributor

@mptre mptre commented Jan 6, 2021

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

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
@wcawijngaards wcawijngaards merged commit d188096 into NLnetLabs:master Jan 6, 2021
wcawijngaards added a commit that referenced this pull request Jan 6, 2021
- Merge PR #395 from mptre: add missing null check.
@wcawijngaards
Copy link
Member

Thank you for the patch. I think the same issue was already solved in a fix for #376 in commit 08968ba . But the patch looks fine, so merged it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants