From: Brendan O'Dea Date: Wed, 9 Feb 2005 00:45:34 +0000 (+0000) Subject: off by one X-Git-Tag: 2.2.1-2fdn3.1~19^2^2~1^2~238 X-Git-Url: http://git.sameswireless.fr/l2tpns.git/commitdiff_plain/d93ad232837788263c14cc07bdfac45a15c78d90?ds=sidebyside;hp=be29ef6cb251dbcf421701a44333520a755aecae off by one --- diff --git a/l2tpns.c b/l2tpns.c index f006843..5ed1dce 100644 --- a/l2tpns.c +++ b/l2tpns.c @@ -4,7 +4,7 @@ // Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced // vim: sw=8 ts=8 -char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.82 2005-02-09 00:16:17 bodea Exp $"; +char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.83 2005-02-09 00:45:34 bodea Exp $"; #include #include @@ -3134,7 +3134,7 @@ static void initdata(int optdebug, char *optconfig) memset(ip_address_pool, 0, sizeof(ippoolt) * MAXIPPOOL); // Put all the sessions on the free list marked as undefined. - for (i = 1; i < MAXSESSION - 1; i++) + for (i = 1; i < MAXSESSION; i++) { session[i].next = i + 1; session[i].tunnel = T_UNDEF; // mark it as not filled in. @@ -3143,7 +3143,7 @@ static void initdata(int optdebug, char *optconfig) sessionfree = 1; // Mark all the tunnels as undefined (waiting to be filled in by a download). - for (i = 1; i < MAXTUNNEL- 1; i++) + for (i = 1; i < MAXTUNNEL; i++) tunnel[i].state = TUNNELUNDEF; // mark it as not filled in. if (!*hostname)