Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 101ffd7

Browse files
Jakujecryptomilk
authored andcommitted
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 574690a)
1 parent 45878b1 commit 101ffd7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/config.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,11 @@ ssh_config_parse_line(ssh_session session,
394394
long l;
395395
int64_t ll;
396396

397+
/* Ignore empty lines */
398+
if (line == NULL || *line == '\0') {
399+
return 0;
400+
}
401+
397402
x = s = strdup(line);
398403
if (s == NULL) {
399404
ssh_set_error_oom(session);

0 commit comments

Comments
 (0)