aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-10-28 22:38:59 +0000
committerUlrich Drepper <drepper@redhat.com>2005-10-28 22:38:59 +0000
commit034a1ee59f28c58f685ef9b6376ad7568c8bdb49 (patch)
tree26c295fb4d73982500a595cf286afbda27880d58
parent20d511e0c584222a4e6045650e3d14d19c6f137d (diff)
downloadglibc-034a1ee59f28c58f685ef9b6376ad7568c8bdb49.zip
glibc-034a1ee59f28c58f685ef9b6376ad7568c8bdb49.tar.gz
glibc-034a1ee59f28c58f685ef9b6376ad7568c8bdb49.tar.bz2
(_nss_nis_getpublickey): Fix off by one error.
-rw-r--r--nis/nss_nis/nis-publickey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nis/nss_nis/nis-publickey.c b/nis/nss_nis/nis-publickey.c
index 6e92112..5aa41b8 100644
--- a/nis/nss_nis/nis-publickey.c
+++ b/nis/nss_nis/nis-publickey.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2001,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999,2001,2002,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
@@ -120,7 +120,7 @@ _nss_nis_getsecretkey (const char *netname, char *skey, char *passwd,
++p;
strncpy (buf, p, 2 * (HEXKEYBYTES + 1));
- buf[2 * (HEXKEYBYTES + 1)] = '\0';
+ buf[2 * HEXKEYBYTES + 1] = '\0';
if (!xdecrypt (buf, passwd))
return NSS_STATUS_SUCCESS;