summaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorrumble <rumble>2004-07-19 01:19:41 +0000
committerrumble <rumble>2004-07-19 01:19:41 +0000
commit01c9cbc97c0c2031878a7abe6ee4efd0e98f62a4 (patch)
treee57782d79f464756a6c6b3cf343e118e4c92e2e9 /news
parent97ee642e68ae7d85412f612fe8727aa780288579 (diff)
downloadpkgsrc-01c9cbc97c0c2031878a7abe6ee4efd0e98f62a4.tar.gz
patch-bd: Address a null pointer deference that occurs when
gethostbyname(3) cannot resolve the local host returned by gethostname(3).
Diffstat (limited to 'news')
-rw-r--r--news/nn/distinfo3
-rw-r--r--news/nn/patches/patch-bd13
2 files changed, 15 insertions, 1 deletions
diff --git a/news/nn/distinfo b/news/nn/distinfo
index 69530b4a433..8fbd9bf500d 100644
--- a/news/nn/distinfo
+++ b/news/nn/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2004/05/03 12:56:10 kim Exp $
+$NetBSD: distinfo,v 1.5 2004/07/19 01:19:41 rumble Exp $
SHA1 (nn-6.6.4.tar.gz) = 9e89a1b93b4315d3ed484bf87495f357bb9cc7b4
Size (nn-6.6.4.tar.gz) = 581672 bytes
@@ -30,3 +30,4 @@ SHA1 (patch-az) = 9a6ad8f19a641ca33107366bf2d92d66ea475110
SHA1 (patch-ba) = bbc9cbec0d191be082b1f211d146916e07100d43
SHA1 (patch-bb) = af094b78b3f2fc0cdb77dea834d74a35fbb170a4
SHA1 (patch-bc) = 981b2abf745d41f82e1dd4b77981457a5f19591c
+SHA1 (patch-bd) = a1f2fc2e3009b26d6d19760ce837ce257e1112a1
diff --git a/news/nn/patches/patch-bd b/news/nn/patches/patch-bd
new file mode 100644
index 00000000000..756d7ef40f9
--- /dev/null
+++ b/news/nn/patches/patch-bd
@@ -0,0 +1,13 @@
+--- 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;