knownhost.c: fixed that 'key_type_len' may be used uninitialized
../src/knownhost.c: In function 'libssh2_knownhost_readline': ../src/knownhost.c:651:16: warning: 'key_type_len' may be used uninitialized in this function [-Wmaybe-uninitialized] rc = knownhost_add(hosts, hostbuf, NULL, ^ ../src/knownhost.c:745:12: note: 'key_type_len' was declared here size_t key_type_len; ^
This commit is contained in:
parent
21cb7bfb36
commit
378d0a6676
@ -742,7 +742,7 @@ static int hostline(LIBSSH2_KNOWNHOSTS *hosts,
|
||||
const char *comment = NULL;
|
||||
const char *key_type_name = NULL;
|
||||
size_t commentlen = 0;
|
||||
size_t key_type_len;
|
||||
size_t key_type_len = 0;
|
||||
int key_type;
|
||||
|
||||
/* make some checks that the lengths seem sensible */
|
||||
|
Loading…
x
Reference in New Issue
Block a user