From b21fa963c4194082792a26023f265ebe50ca5c9e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 14 Jan 2007 05:26:04 +0000 Subject: * nis/nss_nis/nis-service.c (_nss_nis_getservbyname_r): Correct computation of keylen. --- nis/nss_nis/nis-service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nis') 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" */ -- cgit v1.1