--- src/openvpn/options.c 2017-12-07 13:21:03.915892000 +1100 +++ src/openvpn/options.c 2017-12-07 13:27:37.871452518 +1100 @@ -4267,6 +4267,20 @@ int msglevel, struct gc_arena *gc) { + return parse_line_extra(line, p, n, file, line_num, + msglevel, gc, OPTION_PARM_SIZE); +} + +int +parse_line_extra(const char *line, + char *p[], + const int n, + const char *file, + const int line_num, + int msglevel, + struct gc_arena *gc, + int param_len) +{ const int STATE_INITIAL = 0; const int STATE_READING_QUOTED_PARM = 1; const int STATE_READING_UNQUOTED_PARM = 2; @@ -4281,7 +4295,7 @@ bool backslash = false; char in, out; - char parm[OPTION_PARM_SIZE]; + char parm[param_len]; unsigned int parm_len = 0; msglevel &= ~M_OPTERR; --- src/openvpn/options.h 2017-09-26 19:27:37.000000000 +1000 +++ src/openvpn/options.h 2017-12-07 13:22:35.103803335 +1100 @@ -56,6 +56,7 @@ * Max size of options line and parameter. */ #define OPTION_PARM_SIZE 256 +#define OPTION_LONG_PARM_SIZE 2048 #define OPTION_LINE_SIZE 256 extern const char title_string[]; --- src/openvpn/manage.c 2017-12-07 13:21:03.911892000 +1100 +++ src/openvpn/manage.c 2017-12-07 13:30:16.550784231 +1100 @@ -2021,7 +2021,7 @@ } else { - nparms = parse_line(line, parms, MAX_PARMS, "TCP", 0, M_CLIENT, &gc); + nparms = parse_line_extra(line, parms, MAX_PARMS, "TCP", 0, M_CLIENT, &gc, OPTION_LONG_PARM_SIZE); if (parms[0] && streq(parms[0], "password")) { msg(D_MANAGEMENT_DEBUG, "MANAGEMENT: CMD 'password [...]'");