diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2007-02-18 22:46:21 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2007-02-18 22:46:21 +0000 |
commit | 34337a71b8d8ad7d50fdf1152efbe5c3dde4bb90 (patch) | |
tree | 5e6ff654bd7b5d109410290ce3eefc9eadd79a0c /storage_text.c | |
parent | 0f4c1bb59f2c939cabddd02e226954a3cfa02a7b (diff) |
Fixed a possible issue with corrupted .nicks files in text_load().
Diffstat (limited to 'storage_text.c')
-rw-r--r-- | storage_text.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage_text.c b/storage_text.c index 3a11facf..7c29d95a 100644 --- a/storage_text.c +++ b/storage_text.c @@ -97,7 +97,7 @@ static storage_status_t text_load ( const char *my_nick, const char* password, i if( !fp ) return STORAGE_NO_SUCH_USER; while( fscanf( fp, "%s %d %s", s, &proto, nick ) > 0 ) { - if( ( acc = acc_lookup[proto] ) == NULL ) + if( proto < 0 || proto > 8 || ( acc = acc_lookup[proto] ) == NULL ) continue; http_decode( s ); |