From eeb019acee57ef5b9485569ec4d3279a822c4eb0 Mon Sep 17 00:00:00 2001 From: Selva Nair Date: Tue, 14 Dec 2021 11:59:22 -0500 Subject: [PATCH] Increase ERR_BUF_SIZE when management interface support is enabled 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 Acked-by: Arne Schwabe 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 --- src/openvpn/error.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/error.h b/src/openvpn/error.h index 533354b3c..66c1722e7 100644 --- a/src/openvpn/error.h +++ b/src/openvpn/error.h @@ -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 -- 2.47.2