scp: Make sure arguments are sane

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
Jakub Jelen
2023-06-28 12:22:27 +02:00
parent 9c19ba7f33
commit f8a7571a91

View File

@@ -66,7 +66,7 @@ ssh_scp ssh_scp_new(ssh_session session, int mode, const char *location)
{ {
ssh_scp scp = NULL; ssh_scp scp = NULL;
if (session == NULL) { if (session == NULL || location == NULL) {
goto error; goto error;
} }