1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s3: libsmb: Protect cli_connect_nb_send() from being passed a NULL hostname and dest_ss.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12135

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
(cherry picked from commit 27ebf64b347a770e0d1ad4f1db645cb1b8dd5861)
This commit is contained in:
Jeremy Allison 2016-08-08 16:53:21 -07:00 committed by Stefan Metzmacher
parent d6e8fd9dcf
commit e217c14f3c

View File

@ -3108,11 +3108,15 @@ static struct tevent_req *cli_connect_nb_send(
}
state->desthost = host;
} else {
} else if (dest_ss != NULL) {
state->desthost = print_canonical_sockaddr(state, dest_ss);
if (tevent_req_nomem(state->desthost, req)) {
return tevent_req_post(req, ev);
}
} else {
/* No host or dest_ss given. Error out. */
tevent_req_error(req, EINVAL);
return tevent_req_post(req, ev);
}
subreq = cli_connect_sock_send(state, ev, host, name_type, dest_ss,