From ca7325359e8763bb5c1db2ac188d22b4c100d531 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 8 Dec 2011 16:46:06 -0500 Subject: Ignore NULL-terminator when checking UTF8-validity for netgroups Glib fails if the NULL-terminator is included when a length is specified. --- src/responder/nss/nsssrv_netgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/responder/nss/nsssrv_netgroup.c b/src/responder/nss/nsssrv_netgroup.c index 7d5665d4..189f8524 100644 --- a/src/responder/nss/nsssrv_netgroup.c +++ b/src/responder/nss/nsssrv_netgroup.c @@ -115,7 +115,7 @@ int nss_cmd_setnetgrent(struct cli_ctx *client) } /* If the body isn't valid UTF-8, fail */ - if (!sss_utf8_check(body, blen)) { + if (!sss_utf8_check(body, blen -1)) { ret = EINVAL; goto done; } -- cgit