mirror of
git://erdgeist.org/opentracker
synced 2025-03-29 01:22:55 +08:00
Prevent infinite loop if whitelist ends in several returns
This commit is contained in:
parent
216447492a
commit
09adf4a9e1
@ -78,7 +78,7 @@ static void accesslist_readfile( void ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Find start of next line */
|
/* Find start of next line */
|
||||||
while( read_offs < map_end && *(read_offs++) != '\n' );
|
while( read_offs <= map_end && *(read_offs++) != '\n' );
|
||||||
}
|
}
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
fprintf( stderr, "Added %zd info_hashes to accesslist\n", (size_t)(info_hash - accesslist_new) );
|
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;
|
(void)args;
|
||||||
|
|
||||||
while( 1 ) {
|
while( 1 ) {
|
||||||
|
|
||||||
/* Initial attempt to read accesslist */
|
/* Initial attempt to read accesslist */
|
||||||
accesslist_readfile( );
|
accesslist_readfile( );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user