]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Make sure options->ciphername and options->authname are always defined
authorSteffan Karger <steffan@karger.me>
Wed, 28 Sep 2016 10:40:51 +0000 (12:40 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 28 Sep 2016 10:40:51 +0000 (12:40 +0200)
commit348c416face9a025b618ebcae9d3a74c5a4a242b
treede3e9745466150aa3d1eb18356ee803ce707ca1e
parent0c72e29c990a766e6952455d23151dabf79ed22b
Make sure options->ciphername and options->authname are always defined

The NCP code does a strcmp(options->ciphername, ...) without first checking
whether options->ciphername is NULL.  This could cause a crash when using
"--cipher none".  This patch fixes that problem by ensuring that
options->ciphername (and options->authname) are never NULL.  Ensuring that
options->ciphername is never null prevents us from having to write null
checks everywhere.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1475055231-1778-1-git-send-email-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg12576.html

Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/crypto.c
src/openvpn/init.c
src/openvpn/options.c