Thanks for this.

Found by Coverity - in the case of a problem in platform_create_temp_file(),
the old code would have accessed strlen(NULL) and *boom*.  Unlikely, but
arguably still possible if something changes with --tmpdir while openvpn
is running, or so.

Stared at code v2+v3, like v3 better :-) - tested non-error branch
on Linux and FreeBSD (its own can of worms), works.

Your patch has been applied to the master branch.

commit d1045d19bf4ea1f717edac7c67f20e9d8eb3a261
Author: Heiko Hund
Date:   Tue May 20 09:33:48 2025 +0200

     dns: fix potential NULL pointer dereference

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


--
kind regards,

Gert Doering



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to