summaryrefslogtreecommitdiff
path: root/src/responder/pam
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 14:24:18 -0500
commitd22a6b9feb74bd630ab25dd6c32da6ae88b4fc33 (patch)
tree2e58319b3c219056f103b6fdb470d9884c6e2c12 /src/responder/pam
parentd4d9091f705da146d549c31b62ebf21e863fbfcf (diff)
downloadsssd-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/pam')
-rw-r--r--src/responder/pam/pamsrv_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index 2a000f09..40df755d 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -71,7 +71,7 @@ static int extract_string(char **var, size_t size, uint8_t *body, size_t blen,
if (str[size-1]!='\0') return EINVAL;
/* If the string isn't valid UTF-8, fail */
- if (!sss_utf8_check(str, size)) {
+ if (!sss_utf8_check(str, size-1)) {
return EINVAL;
}