From e7cc3b383e5e9190aa7784554c605a3a661ebe2b Mon Sep 17 00:00:00 2001 From: Nick Hilliard Date: Tue, 17 Mar 2009 22:14:25 +0000 Subject: [bgpd] Small buffer overrun in bgp_clear_node_queue_init * bgp_route.c: (bgp_clear_node_queue_init) fix buffer overrun. --- bgpd/bgp_route.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 8dafd181..d08cb1e1 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -2726,8 +2726,7 @@ bgp_clear_node_complete (struct work_queue *wq) static void bgp_clear_node_queue_init (struct peer *peer) { -#define CLEAR_QUEUE_NAME_LEN 26 /* "clear 2001:123:123:123::1" */ - char wname[CLEAR_QUEUE_NAME_LEN]; + char wname[sizeof("clear xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx"]; snprintf (wname, CLEAR_QUEUE_NAME_LEN, "clear %s", peer->host); #undef CLEAR_QUEUE_NAME_LEN -- cgit v1.2.1