summaryrefslogtreecommitdiff
path: root/src/responder/nss
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:53 -0500
commitca7325359e8763bb5c1db2ac188d22b4c100d531 (patch)
tree3f97876ff9453879d4be8b2ab93251c850245226 /src/responder/nss
parentb46635a151ca93b74a45bbaa3f782da43b3692f9 (diff)
downloadsssd-ca7325359e8763bb5c1db2ac188d22b4c100d531.tar.gz
sssd-ca7325359e8763bb5c1db2ac188d22b4c100d531.tar.bz2
sssd-ca7325359e8763bb5c1db2ac188d22b4c100d531.zip
Ignore NULL-terminator when checking UTF8-validity for netgroups
Glib fails if the NULL-terminator is included when a length is specified.
Diffstat (limited to 'src/responder/nss')
-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 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;
}