summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2019-06-24 22:09:19 +0200
committerDave Davenport <qball@gmpclient.org>2019-06-24 22:09:19 +0200
commit14955e5508a74d51e77885107acba5ae71614aad (patch)
tree00c035e91e8dd8dbff9f849f43d9268722aa24d9
parent9a5ae427d9890ddc30b91ada74ac30565807dcdb (diff)
[SSH] Fix wrong sizeof in read_hosts_file
-rw-r--r--source/dialogs/ssh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/dialogs/ssh.c b/source/dialogs/ssh.c
index 7e94bd26..35ee1ad6 100644
--- a/source/dialogs/ssh.c
+++ b/source/dialogs/ssh.c
@@ -301,7 +301,7 @@ static SshEntry *read_hosts_file ( SshEntry * retv, unsigned int *length )
if ( !found ) {
// Add this host name to the list.
retv = g_realloc ( retv,
- ( ( *length ) + 2 ) * sizeof ( char* ) );
+ ( ( *length ) + 2 ) * sizeof ( SshEntry ) );
retv[( *length )].hostname = g_strdup ( token );
retv[( *length )].port = 0;
retv[( *length ) + 1].hostname = NULL;