mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +03:00
bind_config: Ignore empty lines
This also avoids buffer overflow with empty lines. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -301,7 +301,12 @@ ssh_bind_config_parse_line(ssh_bind bind,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((line == NULL) || (parser_flags == NULL)) {
|
/* Ignore empty lines */
|
||||||
|
if (line == NULL || *line == '\0') {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parser_flags == NULL) {
|
||||||
ssh_set_error_invalid(bind);
|
ssh_set_error_invalid(bind);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user