Commit 38e3c7a4 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Prevent possible crash if receiving IPv6 STUN packet.

parent d5014c8d
......@@ -1697,7 +1697,8 @@ void ice_handle_stun_packet(IceCheckList *cl, RtpSession *rtp_session, const Ort
switch (aaddr->ss_family) {
case AF_INET6:
remote_port = ntohs(((struct sockaddr_in6 *)&evt_data->ep->addr)->sin6_port);
break;
ms_warning("ice: Received IPv6 STUN packet. Not supported yet!");
return;
case AF_INET:
udp_remote = (struct sockaddr_in*)&evt_data->ep->addr;
remote_port = ntohs(udp_remote->sin_port);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment