summaryrefslogtreecommitdiffstats
path: root/src/responder/nss/nsssrv_cmd.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-12-05 13:40:51 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-12-05 13:50:04 -0500
commitd03f17c2dbaa8235725d6ea9d9474557fdd0f8f7 (patch)
treec0d3104d1a11193d6f3b45f042ed1aacff9cdcb6 /src/responder/nss/nsssrv_cmd.c
parentd488258da8c9d419af6d8ac4f88732b6494455c4 (diff)
downloadsssd-fc412d24770f0a2d551f0ee456839e8d631e3991.tar.gz
sssd-fc412d24770f0a2d551f0ee456839e8d631e3991.tar.xz
sssd-fc412d24770f0a2d551f0ee456839e8d631e3991.zip
Ignore NULL-terminator when checking UTF8-validitysssd-1.5.1-45.el5
Glib fails if the NULL-terminator is included when a length is specified.
Diffstat (limited to 'src/responder/nss/nsssrv_cmd.c')
-rw-r--r--src/responder/nss/nsssrv_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index 31a47210d..6848413dd 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -875,7 +875,7 @@ static int nss_cmd_getpwnam(struct cli_ctx *cctx)
}
/* 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;
}
@@ -2149,7 +2149,7 @@ static int nss_cmd_getgrnam(struct cli_ctx *cctx)
}
/* 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;
}
@@ -3196,7 +3196,7 @@ static int nss_cmd_initgroups(struct cli_ctx *cctx)
}
/* 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;
}