diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2016-09-12 17:55:32 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2016-09-12 17:55:32 +0200 |
commit | 4719aa7b298ddd3f72c615284ccf9d29adf9fce3 (patch) | |
tree | 63fa723cf9333ac4e795a5767ee59ac850ba85a0 | |
parent | 6edb2c620fafa15acf25275c04355e34abeeef72 (diff) | |
download | cssh-4719aa7b298ddd3f72c615284ccf9d29adf9fce3.tar.gz cssh-4719aa7b298ddd3f72c615284ccf9d29adf9fce3.tar.bz2 |
fixed a realloc size mismatch (thanks to OpenBSD's implementation of realloc to find it)
-rw-r--r-- | src/cssh.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 ) ); |