summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-12-08 16:46:06 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-12-09 08:22:39 -0500
commit8f9336b0e7e13d4d133555cc98d46a28397d82e4 (patch)
treef8a2862804b5797c888777c6ecddf3eaa4c03490
parentd03f17c2dbaa8235725d6ea9d9474557fdd0f8f7 (diff)
downloadsssd-8f9336b0e7e13d4d133555cc98d46a28397d82e4.tar.gz
sssd-8f9336b0e7e13d4d133555cc98d46a28397d82e4.tar.xz
sssd-8f9336b0e7e13d4d133555cc98d46a28397d82e4.zip
Ignore NULL-terminator when checking UTF8-validity for netgroupssssd-1.5.1-46.el5
Glib fails if the NULL-terminator is included when a length is specified.
-rw-r--r--src/responder/nss/nsssrv_netgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/responder/nss/nsssrv_netgroup.c b/src/responder/nss/nsssrv_netgroup.c
index ac586c960..c4b5319f5 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;
}