Fix g_inet_address_to_string() on XP
authorWouter Paesen <wouter@blue-gate.be>
Tue, 26 May 2015 15:03:50 +0000 (17:03 +0200)
committerDan Winship <danw@gnome.org>
Mon, 29 Jun 2015 14:46:21 +0000 (10:46 -0400)
[This patch originally also included an equivalent to the fix that was
committed in 3e29dada, but that was not the complete fix for the bug.]

https://bugzilla.gnome.org/show_bug.cgi?id=749911

gio/ginetaddress.c

index 39610ae..9e069a4 100644 (file)
@@ -446,7 +446,7 @@ inet_ntop (gint family,
   else
     {
       /* Fallback codepath for XP/Server 2003 */
-      DWORD buflen = sizeof (addr_str), addrlen;
+      DWORD buflen = size, addrlen;
       struct sockaddr_storage sa;
       struct sockaddr_in *sin = (struct sockaddr_in *)&sa;
       struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&sa;