diff options
-rw-r--r-- | usr.sbin/bgpd/rde_attr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c index 65ae8b440c4..f27cc53950e 100644 --- a/usr.sbin/bgpd/rde_attr.c +++ b/usr.sbin/bgpd/rde_attr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_attr.c,v 1.67 2006/12/18 19:16:59 henning Exp $ */ +/* $OpenBSD: rde_attr.c,v 1.68 2006/12/21 15:25:19 claudio Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -143,6 +143,9 @@ attr_optadd(struct rde_aspath *asp, u_int8_t flags, u_int8_t type, } /* no empty slot found, need to realloc */ + if (asp->others_len == UCHAR_MAX) + fatalx("attr_optadd: others_len overflow"); + asp->others_len++; if ((p = realloc(asp->others, asp->others_len * sizeof(struct attr *))) == NULL) |