Fixes a bug in management_callback_send_cc_message, should be strlen instead of sizeof
PATCH 1/1 Fixes a bug in management_callback_send_cc_message, should be strlen instead of sizeof
Signed-off-by Eric Thorpe <[email protected]...>
--- src/openvpn/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/openvpn/init.c +1 -1
@@ -312,7 +312,7 @@ management_callback_send_cc_message(void *arg, const char *parameters) {struct context *c = (struct context *) arg; -size_t len =strlen (command) +1 +sizeof (parameters) +1 ; +size_t len =strlen (command) +1 +strlen (parameters) +1 ;if (len >PUSH_BUNDLE_SIZE ) {return false;
Signature · 1 line
2.25.1
Am 20.08.20 um 03:42 schrieb Eric Thorpe:
Quoted 11 lines
Signed-off-by Eric Thorpe <[email protected]...>--- src/openvpn/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/openvpn/init.c +0
-0
src/openvpn/init.c management_callback_send_cc_message(void *arg, · line 318
Quoted 8 lines
src/openvpn/init.c +1
-1@@ -312,7 +312,7 @@ management_callback_send_cc_message(void *arg, const char *parameters) {struct context *c = (struct context *) arg; -size_t len =strlen (command) +1 +sizeof (parameters) +1 ; +size_t len =strlen (command) +1 +strlen (parameters) +1 ;if (len >PUSH_BUNDLE_SIZE ) {return false;
Acked-by Arne Schwabe <[email protected]...>
This probably has escaped my radar because probably the the 2FA codes were always small enough to fit into the 8 extra character of a pointer size.
Arne
I have not tested this, but the change is definitely "obviously correct" :)
Your patch has been applied to the master and release/2.5 branch.
commit 62560e2a29144ffefec231ae7147eb4e9c7dfebf (master) commit 6e1fccaa47c9376cf862219d98678345408c9a54 (release/2.5)
Author: Eric Thorpe Date: Wed Aug 19 18:42:58 2020 -0700
Fixes a bug in management_callback_send_cc_message, should be strlen instead of sizeof
Signed-off-by: Eric Thorpe <[email protected]...>
Acked-by: Arne Schwabe <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg20783.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering