Fixes a bug in management_callback_send_cc_message, should be strlen instead of sizeof

Signed-off-by: Eric Thorpe <eric@sparklabs.com>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20200820014258.38377-1-eric@sparklabs.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20783.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
Eric Thorpe 2020-08-19 18:42:58 -07:00 committed by Gert Doering
parent 2ab0a92442
commit 62560e2a29

View file

@ -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;