summaryrefslogtreecommitdiff
path: root/recipes/glib/0019-Fix-g_inet_address_to_string-on-XP.patch
blob: 4d4c537a3a54d4a440974c7e4d41d8401cd351c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From a4c3ab58ccf32b0f50ce6f78fa7d18ee5745d510 Mon Sep 17 00:00:00 2001
From: Wouter Paesen <wouter@blue-gate.be>
Date: Tue, 26 May 2015 17:03:50 +0200
Subject: [PATCH] Fix g_inet_address_to_string() on XP

[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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gio/ginetaddress.c b/gio/ginetaddress.c
index 39610ae..9e069a4 100644
--- a/gio/ginetaddress.c
+++ b/gio/ginetaddress.c
@@ -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;
-- 
2.4.5