aboutsummaryrefslogtreecommitdiff
path: root/nis
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-01-14 05:26:04 +0000
committerUlrich Drepper <drepper@redhat.com>2007-01-14 05:26:04 +0000
commitb21fa963c4194082792a26023f265ebe50ca5c9e (patch)
tree78c2bb40d7a4fdb8b0b9c2c424fba511613e70e8 /nis
parent23691ab23b6e631ae0c5cf58455cca25a0058e22 (diff)
downloadglibc-b21fa963c4194082792a26023f265ebe50ca5c9e.zip
glibc-b21fa963c4194082792a26023f265ebe50ca5c9e.tar.gz
glibc-b21fa963c4194082792a26023f265ebe50ca5c9e.tar.bz2
* nis/nss_nis/nis-service.c (_nss_nis_getservbyname_r): Correct
computation of keylen.
Diffstat (limited to 'nis')
-rw-r--r--nis/nss_nis/nis-service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nis/nss_nis/nis-service.c b/nis/nss_nis/nis-service.c
index 0c17609..59a598f 100644
--- a/nis/nss_nis/nis-service.c
+++ b/nis/nss_nis/nis-service.c
@@ -271,7 +271,7 @@ _nss_nis_getservbyname_r (const char *name, const char *protocol,
/* If the protocol is given, we could try if our NIS server knows
about services.byservicename map. If yes, we only need one query. */
- size_t keylen = strlen (name) + 1 + (protocol ? strlen (protocol) : 0);
+ size_t keylen = strlen (name) + (protocol ? 1 + strlen (protocol) : 0);
char key[keylen + 1];
/* key is: "name/proto" */