Commit 921234e8 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

stun_common.c: use SU_SOCKADDR_SIZE() to calculate correct size for sockaddr in stun_send_message()

Problem reported by Konstantin Belousov.

parent 7358c8c6
...@@ -616,7 +616,8 @@ int stun_send_message(su_socket_t s, su_sockaddr_t *to_addr, ...@@ -616,7 +616,8 @@ int stun_send_message(su_socket_t s, su_sockaddr_t *to_addr,
stun_encode_message(msg, pwd); stun_encode_message(msg, pwd);
err = su_sendto(s, msg->, msg->enc_buf.size, 0, to_addr, sizeof *to_addr); err = su_sendto(s, msg->, msg->enc_buf.size, 0,
to_addr, SU_SOCKADDR_SIZE(to_addr));
free(msg->, msg-> = NULL; free(msg->, msg-> = NULL;
msg->enc_buf.size = 0; msg->enc_buf.size = 0;
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