diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-12-05 13:40:51 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-12-05 14:24:18 -0500 |
commit | d22a6b9feb74bd630ab25dd6c32da6ae88b4fc33 (patch) | |
tree | 2e58319b3c219056f103b6fdb470d9884c6e2c12 /src/responder/nss | |
parent | d4d9091f705da146d549c31b62ebf21e863fbfcf (diff) | |
download | sssd-d22a6b9feb74bd630ab25dd6c32da6ae88b4fc33.tar.gz sssd-d22a6b9feb74bd630ab25dd6c32da6ae88b4fc33.tar.bz2 sssd-d22a6b9feb74bd630ab25dd6c32da6ae88b4fc33.zip |
Ignore NULL-terminator when checking UTF8-validity
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_cmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c index fcfacb73..8e40bd2e 100644 --- a/src/responder/nss/nsssrv_cmd.c +++ b/src/responder/nss/nsssrv_cmd.c @@ -912,7 +912,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; } @@ -2199,7 +2199,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; } @@ -3257,7 +3257,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; } |