summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/dvmrpd/parse.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/dvmrpd/parse.y b/usr.sbin/dvmrpd/parse.y
index 72d3be96505..ae20108cccf 100644
--- a/usr.sbin/dvmrpd/parse.y
+++ b/usr.sbin/dvmrpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.15 2008/02/27 15:36:42 mpf Exp $ */
+/* $OpenBSD: parse.y,v 1.16 2008/07/02 08:52:30 norby Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -844,6 +844,11 @@ conf_get_if(struct kif *kif)
{
struct iface *i;
+ if (kif->ifindex >= MAXVIFS) {
+ yyerror("interface %s index too large", kif->ifname);
+ return (NULL);
+ }
+
LIST_FOREACH(i, &conf->iface_list, entry)
if (i->ifindex == kif->ifindex) {
yyerror("interface %s already configured",