From 09adf4a9e15a04217df64adcba64e5e683ff24f8 Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Thu, 26 Aug 2010 01:36:32 +0000 Subject: Prevent infinite loop if whitelist ends in several returns --- ot_accesslist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ot_accesslist.c') diff --git a/ot_accesslist.c b/ot_accesslist.c index 1c8dff4..cdb964d 100644 --- a/ot_accesslist.c +++ b/ot_accesslist.c @@ -78,7 +78,7 @@ static void accesslist_readfile( void ) { } /* Find start of next line */ - while( read_offs < map_end && *(read_offs++) != '\n' ); + while( read_offs <= map_end && *(read_offs++) != '\n' ); } #ifdef _DEBUG fprintf( stderr, "Added %zd info_hashes to accesslist\n", (size_t)(info_hash - accesslist_new) ); @@ -121,7 +121,7 @@ static void * accesslist_worker( void * args ) { (void)args; while( 1 ) { - + /* Initial attempt to read accesslist */ accesslist_readfile( ); -- cgit v1.2.3