From 15aa6a1a732eef1049dbc64d7ede9236772cafcf Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Thu, 30 Mar 2006 14:39:35 +0000 Subject: [bgpd] Fix infinite loop in community_str2com 2006-03-30 Paul Jakma * bgp_community.c: (community_gettoken) Unknown token should return NULL, to give a strong indication to callers that the token no longer can be parsed, otherwise callers looping on this function may have a hard time ending their loop. (community_str2com) While loop around community_gettoken appears to have been coded thinking that break statement would break from the while{}, hence it could never exit for unknown token case. Fix it to do..while, so it can use the NULL result from community_gettoken easily. --- bgpd/ChangeLog | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bgpd/ChangeLog') diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog index 26897f3c..2a442f27 100644 --- a/bgpd/ChangeLog +++ b/bgpd/ChangeLog @@ -1,3 +1,15 @@ +2006-03-30 Paul Jakma + + * bgp_community.c: (community_gettoken) Unknown token should + return NULL, to give a strong indication to callers that + the token no longer can be parsed, otherwise callers looping + on this function may have a hard time ending their loop. + (community_str2com) While loop around community_gettoken appears + to have been coded thinking that break statement would break + from the while{}, hence it could never exit for unknown token + case. Fix it to do..while, so it can use the NULL result from + community_gettoken easily. + 2006-03-22 Paul Jakma * bgpd.c: (peer_free) release the per-peer workqueue when -- cgit v1.2.1