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:
committed by
Andreas Schneider
parent
c7cacf986f
commit
574690ae2e
@@ -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);
|
||||
|
Reference in New Issue
Block a user