blob: 2f252f98317d46fb63a9f30db7b59b017af4852d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
$NetBSD: patch-ad,v 1.5 2005/07/17 22:53:06 kristerw Exp $
--- daemon/xdmcp.c.orig Sun Jul 17 23:22:30 2005
+++ daemon/xdmcp.c Sun Jul 17 23:41:59 2005
@@ -1175,6 +1175,7 @@
if (clnt_port.length == 2 &&
clnt_addr.length == 4) {
+ char * ipv4_addr;
/* Convert IPv4 address to IPv6 if needed */
struct sockaddr_in tmp_disp_sa = {0};
@@ -1182,7 +1183,7 @@
memcpy (&((struct sockaddr_in *)(&tmp_disp_sa))->sin_port, clnt_port.data, 2);
memcpy (&((struct sockaddr_in *)(&tmp_disp_sa))->sin_addr.s_addr, clnt_addr.data, 4);
- char * ipv4_addr = inet_ntoa (((struct sockaddr_in *)(&tmp_disp_sa))->sin_addr);
+ ipv4_addr = inet_ntoa (((struct sockaddr_in *)(&tmp_disp_sa))->sin_addr);
strcpy(buffer6, "::ffff:");
strncat(buffer6, ipv4_addr, INET_ADDRSTRLEN);
|