g_socket_send_message() fails due to invalid sendmsg(2) params.
authorJames Hunt <jamesodhunt@gmail.com>
Thu, 10 Sep 2009 16:18:13 +0000 (17:18 +0100)
committerDan Winship <danw@gnome.org>
Fri, 11 Sep 2009 12:52:14 +0000 (08:52 -0400)
commit11477609d1f2782fd4bbb3022d2ec46983930c6a
treebda6fb7ec4e609d8e4662c083089d74b5e045032
parent29baa5eebdce27d10c6f36ae8ad4fbc77d04f291
g_socket_send_message() fails due to invalid sendmsg(2) params.

g_socket_send_message() and g_socket_send_to() fail with ENOBUFS or
EFAULT due to the fact that if no "address" argument is specified to
g_socket_send_message, when g_socket_send_message() calls sendmsg(2),
the 2nd parameter to sendmsg ("const struct msghdr *msg") contains
uninitialized values. The fix is simple - initialize msg.msg_name to
NULL and msg.msg_msg_namelen to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=594759
gio/gsocket.c