diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-08-03 13:46:23 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-08-03 13:46:23 +0000 |
commit | 7677c2239c0e9ecf2605c6875409aa66a80ff6fc (patch) | |
tree | 502de809d6778a42e4802e326212e0e8a3b81fd0 /usr.sbin/bgpd/parse.y | |
parent | e9b6af7b0e27fc1970edfe8c8ce344c70b327dcf (diff) |
deny hilarious prepends. OK henning@
Diffstat (limited to 'usr.sbin/bgpd/parse.y')
-rw-r--r-- | usr.sbin/bgpd/parse.y | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 1d0ab4cf87d..489f1294a29 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.129 2004/08/02 21:30:55 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.130 2004/08/03 13:46:22 claudio Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1099,6 +1099,10 @@ filter_set_opt : LOCALPREF number { } | PREPEND number { $$.flags = SET_PREPEND; + if ($2 > 128) { + yyerror("to many prepends"); + YYERROR; + } $$.prepend = $2; } | PFTABLE string { |