Attention is currently required from: Arne Schwabe.
Hello Arne Schwabe,
I'd like you to do a code review.
Please visit
https://gerrit.openvpn.net/c/openvpn/+/2085?usp=email
to review the following change.
Change subject: init: check parameters for NULL before strlen() in
send_cc_message
......................................................................
init: check parameters for NULL before strlen() in send_cc_message
management_callback_send_cc_message() called strlen(parameters) before
its own NULL check. Only count parameters and the separator when set.
Change-Id: Ib9164e1c8f5e02a2253bbb3b2363a4f9f31c8bdb
Signed-off-by: Razvan Cojocaru <[email protected]>
---
M src/openvpn/init.c
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/85/2085/1
diff --git a/src/openvpn/init.c b/src/openvpn/init.c
index 24cf532..6c87865 100644
--- a/src/openvpn/init.c
+++ b/src/openvpn/init.c
@@ -299,7 +299,11 @@
management_callback_send_cc_message(void *arg, const char *command, const char
*parameters)
{
struct context *c = (struct context *)arg;
- size_t len = strlen(command) + 1 + strlen(parameters) + 1;
+ size_t len = strlen(command) + 1;
+ if (parameters)
+ {
+ len += 1 + strlen(parameters);
+ }
if (len > PUSH_BUNDLE_SIZE)
{
return false;
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2085?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib9164e1c8f5e02a2253bbb3b2363a4f9f31c8bdb
Gerrit-Change-Number: 2085
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel