blob: fc7dfe6391edc2c1ec3631541085577d24e1c94c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
$NetBSD: patch-bd,v 1.2 2005/06/17 15:36:32 hira Exp $
--- nntp.c.old 2004-07-18 15:16:03.000000000 -0400
+++ nntp.c 2004-07-18 15:16:07.000000000 -0400
@@ -837,7 +837,9 @@
if (nntp_local_server) return;
find_server();
- strncpy(host_name, (gethostbyname(host_name))->h_name, sizeof host_name);
+
+ if ((hp = gethostbyname(host_name)) != NULL)
+ strncpy(host_name, hp->h_name, sizeof host_name);
if ((hp = gethostbyname(nntp_server)) != NULL)
server_real_name = hp->h_name;
|