diff options
| author | erdgeist <> | 2010-08-26 01:36:32 +0000 |
|---|---|---|
| committer | erdgeist <> | 2010-08-26 01:36:32 +0000 |
| commit | 09adf4a9e15a04217df64adcba64e5e683ff24f8 (patch) | |
| tree | 510f15978c34fa348b1c5d137903d8f9ad0f3e17 | |
| parent | 216447492a88a65cc01f3bb19352e4dafb263a6a (diff) | |
Prevent infinite loop if whitelist ends in several returns
| -rw-r--r-- | ot_accesslist.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 ) { | |||
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | /* Find start of next line */ | 80 | /* Find start of next line */ |
| 81 | while( read_offs < map_end && *(read_offs++) != '\n' ); | 81 | while( read_offs <= map_end && *(read_offs++) != '\n' ); |
| 82 | } | 82 | } |
| 83 | #ifdef _DEBUG | 83 | #ifdef _DEBUG |
| 84 | fprintf( stderr, "Added %zd info_hashes to accesslist\n", (size_t)(info_hash - accesslist_new) ); | 84 | 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 ) { | |||
| 121 | (void)args; | 121 | (void)args; |
| 122 | 122 | ||
| 123 | while( 1 ) { | 123 | while( 1 ) { |
| 124 | 124 | ||
| 125 | /* Initial attempt to read accesslist */ | 125 | /* Initial attempt to read accesslist */ |
| 126 | accesslist_readfile( ); | 126 | accesslist_readfile( ); |
| 127 | 127 | ||
