From 3c79852d5d5ba4111c0535bafea43450dba8ed12 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 11 Sep 2012 11:37:33 -0400 Subject: NSS: Fix off-by-one error in parse_getservbyname https://fedorahosted.org/sssd/ticket/1438 --- src/responder/nss/nsssrv_services.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/responder') diff --git a/src/responder/nss/nsssrv_services.c b/src/responder/nss/nsssrv_services.c index 90698231..880058fa 100644 --- a/src/responder/nss/nsssrv_services.c +++ b/src/responder/nss/nsssrv_services.c @@ -930,7 +930,7 @@ errno_t parse_getservbyname(TALLOC_CTX *mem_ctx, /* The protocol must be no longer than the remaining * body space, after the name was copied. */ - protocol = talloc_array(tmp_ctx, char, blen - i - 1); + protocol = talloc_array(tmp_ctx, char, blen - i); if (!protocol) { ret = ENOMEM; goto done; -- cgit