diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2007-03-04 12:27:47 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2007-03-04 12:27:47 +0000 |
commit | 980e9c348965f29dfac3f770a1232ff54c8ea565 (patch) | |
tree | a1c00238ca5bcf4f85b87faccd6e052df15816f3 | |
parent | 5d08f0b72007adabb1f7542a7226f7472f94d8bc (diff) |
ran into an asset which has dangling , at eol in the member spec, leading
to us trying to add an empty-string AS, which asset_get later complains
about.
in parse_asset, check that we're no dealing with a empty string token
before calling asset_addmember
-rw-r--r-- | usr.sbin/bgpctl/irr_parser.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bgpctl/irr_parser.c b/usr.sbin/bgpctl/irr_parser.c index f2ea0f48c85..6a21bced1d5 100644 --- a/usr.sbin/bgpctl/irr_parser.c +++ b/usr.sbin/bgpctl/irr_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: irr_parser.c,v 1.2 2007/03/03 14:56:43 henning Exp $ */ +/* $OpenBSD: irr_parser.c,v 1.3 2007/03/04 12:27:46 henning Exp $ */ /* * Copyright (c) 2007 Henning Brauer <henning@openbsd.org> @@ -382,7 +382,8 @@ parse_asset(char *key, char *val) while ((tok = strsep(&val, ",")) != NULL) { EATWS(tok); - asset_addmember(tok); + if (tok[0] != '\0') + asset_addmember(tok); } return (1); |