mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-25 03:41:56 +03:00
known_hosts: Simplify invalid tokens check
CID 1393677 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@ -138,13 +138,7 @@ static char **ssh_get_knownhost_line(FILE **file, const char *filename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
*found_type = tokens[1];
|
*found_type = tokens[1];
|
||||||
if (tokens[3]) {
|
if (tokens[3] || tokens[4]) {
|
||||||
if (tokens[4]) {
|
|
||||||
/* that's never valid */
|
|
||||||
tokens_free(tokens);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
/* 3 tokens only, not four */
|
|
||||||
tokens_free(tokens);
|
tokens_free(tokens);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user