Skip to content

Commit

Permalink
verify we have a share name when connecting a share
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnie Sahlberg <[email protected]>
  • Loading branch information
sahlberg committed Dec 19, 2024
1 parent 180bc38 commit 8954af9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/libsmb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,10 @@ smb2_connect_share_async(struct smb2_context *smb2,
smb2_set_error(smb2, "No server name provided");
return -EINVAL;
}
if (share == NULL) {
smb2_set_error(smb2, "No share name provided");
return -EINVAL;
}
smb2->server = strdup(server);
if (smb2->server == NULL) {
return -ENOMEM;
Expand Down

0 comments on commit 8954af9

Please sign in to comment.