Fix setsockopt() for IPV6_MULTICAST_IF
32bit: sizeof(&ifindex) == sizeof(void *) == 4 64bit: sizeof(&ifindex) == sizeof(void *) == 8 As a result, it is "ifindex" oob acces on 64bit platforms.
This commit is contained in:
parent
241ede9ddf
commit
81dc08d290
|
@ -501,7 +501,7 @@ upnpDiscoverDevices(const char * const deviceTypes[],
|
|||
* MS Windows Vista and MS Windows Server 2008.
|
||||
* http://msdn.microsoft.com/en-us/library/bb408409%28v=vs.85%29.aspx */
|
||||
unsigned int ifindex = if_nametoindex(multicastif); /* eth0, etc. */
|
||||
if(setsockopt(sudp, IPPROTO_IPV6, IPV6_MULTICAST_IF, &ifindex, sizeof(&ifindex)) < 0)
|
||||
if(setsockopt(sudp, IPPROTO_IPV6, IPV6_MULTICAST_IF, &ifindex, sizeof(ifindex)) < 0)
|
||||
{
|
||||
PRINT_SOCKET_ERROR("setsockopt");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue