summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-09-11 11:37:33 -0400
committerJakub Hrozek <jhrozek@redhat.com>2012-09-13 09:24:50 +0200
commit3c79852d5d5ba4111c0535bafea43450dba8ed12 (patch)
treeccbbf82355734a8128968fa7eaf1ad939d673240
parent30f029ee8e4220cfa03ae06df88860186482b483 (diff)
downloadsssd-3c79852d5d5ba4111c0535bafea43450dba8ed12.tar.gz
sssd-3c79852d5d5ba4111c0535bafea43450dba8ed12.tar.xz
sssd-3c79852d5d5ba4111c0535bafea43450dba8ed12.zip
NSS: Fix off-by-one error in parse_getservbyname
https://fedorahosted.org/sssd/ticket/1438
-rw-r--r--src/responder/nss/nsssrv_services.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/responder/nss/nsssrv_services.c b/src/responder/nss/nsssrv_services.c
index 906982317..880058fa8 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;