]> git.ipfire.org Git - thirdparty/openvpn.git/commit
dns: fix potential NULL pointer dereference
authorHeiko Hund <heiko@ist.eigentlich.net>
Tue, 20 May 2025 07:33:48 +0000 (09:33 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 20 May 2025 07:36:15 +0000 (09:36 +0200)
commitd1045d19bf4ea1f717edac7c67f20e9d8eb3a261
tree251b1f156269ae3a2eb80b7fbf3742bbad55b0cd
parentd2b59d6db2ee11f3875257b854e0b77265389f2c
dns: fix potential NULL pointer dereference

Fix issue reported by Coverity (CID 1646952): Dereferencing a pointer
that might be NULL dvf when calling env_set_write_file.

In addition to the fix, inline the write_dns_vars_file() helper function.
Also output a log line in case this error happens, because when it
happens it will hinder communication with the updown runner process, i.e.
setting up / tearing down DNS things will not work as expected.

Change-Id: I275bf939f43577427e14890e7093d63c5213ae5d
Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20250520073354.17091-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31720.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/dns.c