From ffca24bed7a03d95585ad02278667abe75d8b272 Mon Sep 17 00:00:00 2001 From: Alberto Gonzalez Iniesta Date: Tue, 10 May 2016 17:40:25 +0200 Subject: Imported Upstream version 2.3.11 --- src/openvpn/console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/openvpn/console.c') diff --git a/src/openvpn/console.c b/src/openvpn/console.c index e1d46c4..86331a1 100644 --- a/src/openvpn/console.c +++ b/src/openvpn/console.c @@ -172,8 +172,9 @@ get_console_input_systemd (const char *prompt, const bool echo, char *input, con if ((std_out = openvpn_popen (&argv, NULL)) < 0) { return false; } - CLEAR (*input); - if (read (std_out, input, capacity) != 0) + + memset (input, 0, capacity); + if (read (std_out, input, capacity-1) > 0) { chomp (input); ret = true; -- cgit v1.2.3