1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

socket_wrapper: make sure interfaces are in the valid range on bind()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jul 10 18:24:14 CEST 2011 on sn-devel-104
This commit is contained in:
Stefan Metzmacher 2011-07-10 16:40:37 +02:00
parent 1be5a9b1fd
commit 86b7b5cd96

View File

@ -554,6 +554,11 @@ static int convert_in_un_alloc(struct socket_info *si, const struct sockaddr *in
if (bcast) *bcast = is_bcast;
if (iface == 0 || iface > MAX_WRAPPED_INTERFACES) {
errno = EINVAL;
return -1;
}
if (prt == 0) {
/* handle auto-allocation of ephemeral ports */
for (prt = 5001; prt < 10000; prt++) {