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

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

Problem reported by Konstantin Belousov.

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