mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09: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>
(cherry picked from commit 574690ae2e)
This commit is contained in:
committed by
Andreas Schneider
parent
45878b131c
commit
101ffd70a7
@@ -394,6 +394,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