1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-09-04 04:42:09 +03:00

config: Ignore empty lines to avoid OOB array access

Fixes T187

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2019-10-29 14:49:36 +01:00
committed by Andreas Schneider
parent c7cacf986f
commit 574690ae2e

View File

@@ -521,6 +521,11 @@ ssh_config_parse_line(ssh_session session,
long l;
int64_t ll;
/* Ignore empty lines */
if (line == NULL || *line == '\0') {
return 0;
}
x = s = strdup(line);
if (s == NULL) {
ssh_set_error_oom(session);