summaryrefslogtreecommitdiff
path: root/security/openvpn/files/patch-src_openvpn_init.c
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2025-09-07 16:59:33 +0200
committerMatthias Andree <mandree@FreeBSD.org>2025-09-07 17:11:18 +0200
commitd92d41ca1ae2cd5005a5b774e64b38ca2f6915c7 (patch)
treeaa680959aa145fb4fa69c80454f8648f581b46db /security/openvpn/files/patch-src_openvpn_init.c
parentdevel/air-go: Update to 1.63.0 (diff)
security/openvpn: assert()->ASSERT() cleanup
This reverts my prior assert -> if...return(false) change to Ralf Lici's backport, and replaces all assert() by ASSERT(). Gert Doering writes: | OpenVPN's ASSERT() macro will do a bit more than the standard-libc | assert() call, namely print out which function and what expression | failed, before calling _exit(1). Also, it can not be accidentially | compiled-away (-DNDEBUG). | | Use of ASSERT() generally only advised in cases of "this must not happen, | but if it does, it's a programming or state corruption error that we | must know about". Use of assert() is lacking the extra debug info, and as | such, not advised at all. This is a backport of OpenVPN master changes... Obtained from: Gert Doering <gert@greenie.muc.de> Obtained from: <https://gerrit.openvpn.net/c/openvpn/+/1171> PR: 289303 MFH: 2025Q3 (suggestion after 10 days)
Diffstat (limited to 'security/openvpn/files/patch-src_openvpn_init.c')
-rw-r--r--security/openvpn/files/patch-src_openvpn_init.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/security/openvpn/files/patch-src_openvpn_init.c b/security/openvpn/files/patch-src_openvpn_init.c
new file mode 100644
index 000000000000..0d09e6050236
--- /dev/null
+++ b/security/openvpn/files/patch-src_openvpn_init.c
@@ -0,0 +1,22 @@
+--- src/openvpn/init.c.orig 2025-04-02 06:53:10 UTC
++++ src/openvpn/init.c
+@@ -330,7 +330,7 @@ management_callback_remote_entry_count(void *arg)
+ static unsigned int
+ management_callback_remote_entry_count(void *arg)
+ {
+- assert(arg);
++ ASSERT(arg);
+ struct context *c = (struct context *) arg;
+ struct connection_list *l = c->options.connection_list;
+
+@@ -340,8 +340,8 @@ management_callback_remote_entry_get(void *arg, unsign
+ static bool
+ management_callback_remote_entry_get(void *arg, unsigned int index, char **remote)
+ {
+- assert(arg);
+- assert(remote);
++ ASSERT(arg);
++ ASSERT(remote);
+
+ struct context *c = (struct context *) arg;
+ struct connection_list *l = c->options.connection_list;