diff options
author | rumble <rumble@pkgsrc.org> | 2004-07-19 01:19:41 +0000 |
---|---|---|
committer | rumble <rumble@pkgsrc.org> | 2004-07-19 01:19:41 +0000 |
commit | b6fed40cbe524baa0212aba65629fee62541b2c4 (patch) | |
tree | e57782d79f464756a6c6b3cf343e118e4c92e2e9 /news | |
parent | d9a89592056b161e4503b9cdffad5ba8a1e1f9a1 (diff) | |
download | pkgsrc-b6fed40cbe524baa0212aba65629fee62541b2c4.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/distinfo | 3 | ||||
-rw-r--r-- | news/nn/patches/patch-bd | 13 |
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; |