]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Increase ERR_BUF_SIZE when management interface support is enabled
authorSelva Nair <selva.nair@gmail.com>
Tue, 14 Dec 2021 16:59:22 +0000 (11:59 -0500)
committerGert Doering <gert@greenie.muc.de>
Thu, 20 Jan 2022 16:26:32 +0000 (17:26 +0100)
Sending largish messages to the management interface errors due to
the limited size used for the "error" buffer in x_msg_va(). Although
all intermediate steps allocate required space for the data to
send, it gets truncated at the last step.

This really requires a smarter fix. As a quick relief, we just increase
the buffer size to 10240 when management support is compiled in. Should
be enough for PK_SIGN with undigested message.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20211214165928.30676-13-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23440.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/error.h

index 533354b3c16720366538bccff010e12b1bfba559..66c1722e71a7b26720cca8c61623e35085ceab8c 100644 (file)
@@ -37,8 +37,8 @@
 
 /* #define ABORT_ON_ERROR */
 
-#ifdef ENABLE_PKCS11
-#define ERR_BUF_SIZE 8192
+#if defined(ENABLE_PKCS11) || defined(ENABLE_MANAGEMENT)
+#define ERR_BUF_SIZE 10240
 #else
 #define ERR_BUF_SIZE 1280
 #endif