1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-23 16:20:58 +03:00

known_hosts: Simplify invalid tokens check

CID 1393677

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2018-06-30 14:15:07 +02:00
parent 8917b84840
commit 21962dd154

View File

@ -138,13 +138,7 @@ static char **ssh_get_knownhost_line(FILE **file, const char *filename,
}
*found_type = tokens[1];
if (tokens[3]) {
if (tokens[4]) {
/* that's never valid */
tokens_free(tokens);
continue;
}
/* 3 tokens only, not four */
if (tokens[3] || tokens[4]) {
tokens_free(tokens);
continue;
}