]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Ensure input read using systemd-ask-password is null terminated
authorSelva Nair <selva.nair@gmail.com>
Thu, 14 Apr 2016 03:53:33 +0000 (23:53 -0400)
committerGert Doering <gert@greenie.muc.de>
Thu, 14 Apr 2016 20:12:52 +0000 (22:12 +0200)
commit17b22f9da909f0193dff30860b45673d9cd6c509
tree6702bf8032ba1d4248d5c6c3423498056bc6e898
parent68a8c3a26c25ab478611a7fee209a9ecc65c59ce
Ensure input read using systemd-ask-password is null terminated

Also properly check the return value of read() and leave room
for termination.
Fixes junk data occasionally seen in strings read through systemd.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1460606013-4983-1-git-send-email-selva.nair@gmail.com>
URL: http://article.gmane.org/gmane.network.openvpn.devel/11437
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit d09fbf958f1c0b15372b3e87d784ae666b91a96b)
src/openvpn/console.c