diff options
author | 2006-01-20 16:11:22 +0000 | |
---|---|---|
committer | 2006-01-20 16:11:22 +0000 | |
commit | ee9f1746e722ed69256acf5375816f8ad2e6fb91 (patch) | |
tree | 362dcd58cc3164c137181da45e7bec3a8add034a | |
parent | Pass flags to prefix_move() so that a prefix that has both F_ORIGINAL and (diff) | |
download | wireguard-openbsd-ee9f1746e722ed69256acf5375816f8ad2e6fb91.tar.xz wireguard-openbsd-ee9f1746e722ed69256acf5375816f8ad2e6fb91.zip |
initialize authtype->string in case of RSA to avoid bad free()
ok reyk@ hshoexer@
-rw-r--r-- | sbin/ipsecctl/parse.y | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y index 8dd5e259787..4d898d42155 100644 --- a/sbin/ipsecctl/parse.y +++ b/sbin/ipsecctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.49 2006/01/17 05:39:23 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.50 2006/01/20 16:11:22 naddy Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -578,8 +578,14 @@ ikemode : /* empty */ { $$ = IKE_ACTIVE; } | ACTIVE { $$ = IKE_ACTIVE; } ; -ikeauth : /* empty */ { $$.type = IKE_AUTH_RSA; } - | RSA { $$.type = IKE_AUTH_RSA; } +ikeauth : /* empty */ { + $$.type = IKE_AUTH_RSA; + $$.string = NULL; + } + | RSA { + $$.type = IKE_AUTH_RSA; + $$.string = NULL; + } | PSK STRING { $$.type = IKE_AUTH_PSK; if (($$.string = strdup($2)) == NULL) |