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-08 16:49:48 -0500
commitf90eb96a710c110625156bebee5ae7876bd4226b (patch)
tree7023dca177c7940617196ac2d2713b8c4974eaed
parente7a36a13eab6baf1702e5f9bf23b3d29d0405c66 (diff)
downloadsssd_unused-f90eb96a710c110625156bebee5ae7876bd4226b.tar.gz
sssd_unused-f90eb96a710c110625156bebee5ae7876bd4226b.tar.xz
sssd_unused-f90eb96a710c110625156bebee5ae7876bd4226b.zip
Ignore NULL-terminator when checking UTF8-validity for netgroups
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 c8b7bd1d..aa414b17 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;
}