summaryrefslogtreecommitdiff
path: root/src/responder/nss
diff options
context:
space:
mode:
Diffstat (limited to 'src/responder/nss')
-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 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;