diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/ndpi_cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ndpi_cache.c b/src/lib/ndpi_cache.c index c4e25ffea..b97bbcff3 100644 --- a/src/lib/ndpi_cache.c +++ b/src/lib/ndpi_cache.c @@ -446,7 +446,7 @@ u_int32_t ndpi_address_cache_restore(struct ndpi_address_cache *cache, char *pat if(!fd) return(false); - while(fscanf(fd, "%32s\t%255s\t%u\n", ip, hostname, &epoch) > 0) { + while(fscanf(fd, "%32s\t%255s\t%u\n", ip, hostname, &epoch) == 3) { if(epoch >= epoch_now) { /* Entry not yet expired */ u_int ttl = epoch-epoch_now; ndpi_ip_addr_t addr; |