diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2006-06-07 23:02:53 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2006-06-07 23:02:53 +0000 |
commit | 80c556ced4a4f4c7f34331054a12628b856a319f (patch) | |
tree | 220b41422981d27a58b45156eb31c63068443364 /sbin | |
parent | 8c6a339843abdeb078e299963d8a9c4c960fa425 (diff) |
make sure, we initialize unspecified keys and spis. Noticed by
naddy@, ok naddy@.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipsecctl/parse.y | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y index 3f97e5417eb..8b7e103cbc6 100644 --- a/sbin/ipsecctl/parse.y +++ b/sbin/ipsecctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.99 2006/06/07 21:57:52 hshoexer Exp $ */ +/* $OpenBSD: parse.y,v 1.100 2006/06/07 23:02:52 hshoexer Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -558,7 +558,9 @@ spispec : SPI STRING { YYERROR; } $$.spiin = spi; - } + } else + $$.spiin = 0; + if (atospi($2, &spi) == -1) { yyerror("%s is not a valid spi", $2); free($2); @@ -719,7 +721,8 @@ keyspec : STRING { if (!strncmp(p, "0x", 2)) p += 2; $$.keyin = parsekey(p, strlen(p)); - } + } else + $$.keyin = NULL; hex = $1; if (!strncmp(hex, "0x", 2)) |