From f290098d36245cdebaa23205de5cf56829cac2e3 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 ac586c96..c4b5319f 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