mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-09-05 15:44:00 +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;
|
long l;
|
||||||
int64_t ll;
|
int64_t ll;
|
||||||
|
|
||||||
|
/* Ignore empty lines */
|
||||||
|
if (line == NULL || *line == '\0') {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
x = s = strdup(line);
|
x = s = strdup(line);
|
||||||
if (s == NULL) {
|
if (s == NULL) {
|
||||||
ssh_set_error_oom(session);
|
ssh_set_error_oom(session);
|
||||||
|
Reference in New Issue
Block a user