summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cssh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cssh.c b/src/cssh.c
index 4ecb281..486ed16 100644
--- a/src/cssh.c
+++ b/src/cssh.c
@@ -416,7 +416,7 @@ static int read_hosts_file( const char *hosts_file, unsigned short default_port,
}
(*host)[*nof_hosts] = strdup( buf );
(*nof_hosts)++;
- if( *nof_hosts > size_hosts ) {
+ if( *nof_hosts >= size_hosts ) {
size_hosts *= 2;
*host = (char **)realloc( *host, size_hosts * sizeof( char *) );
*port = (unsigned short *)realloc( *port, size_hosts * sizeof( unsigned short ) );