From 034e4c99bd543ba7e9969b964d4b3dda1c579d3b Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Thu, 20 Feb 2003 14:39:01 +0000 Subject: fix potential segfault thx to gwenole --- mdk-stage1/dns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mdk-stage1/dns.c') diff --git a/mdk-stage1/dns.c b/mdk-stage1/dns.c index d1e67c78d..b6cab87ce 100644 --- a/mdk-stage1/dns.c +++ b/mdk-stage1/dns.c @@ -67,7 +67,7 @@ char * mygethostbyaddr(char * ipnum) struct hostent * host; if (!inet_aton(ipnum, &in)) return NULL; - host = gethostbyaddr(&in, strlen((void *) &in), AF_INET); + host = gethostbyaddr(&(in.s_addr), sizeof(in.s_addr), AF_INET); if (host && host->h_name) return host->h_name; return NULL; -- cgit v1.2.1