diff options
author | Alberto Gonzalez Iniesta <agi@inittab.org> | 2016-05-10 17:40:25 +0200 |
---|---|---|
committer | Alberto Gonzalez Iniesta <agi@inittab.org> | 2016-05-10 17:40:25 +0200 |
commit | fd1989a44e8b5f8a1204268c0b831e1215d345c5 (patch) | |
tree | b7953a8e1b3bd31ab9b25ed4a87b66f43cba2007 /src/openvpn/console.c | |
parent | 5ed34d2384cae48c45501f30c9e69512fe54b3ec (diff) | |
parent | ffca24bed7a03d95585ad02278667abe75d8b272 (diff) |
Merge tag 'upstream/2.3.11'
Upstream version 2.3.11
Diffstat (limited to 'src/openvpn/console.c')
-rw-r--r-- | src/openvpn/console.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; |