summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorMalahal Naineni <malahal@us.ibm.com>2012-09-09 10:25:47 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-21 09:32:38 -0700
commit13a34f1542a04f7165c1b41dd6faff85a9ebf061 (patch)
tree9c02867f651c841c136d3e9273a664497c89d1b1 /fs
parent977469fff176739539ac78e2977d50214e2bdcf6 (diff)
NFSD: pass null terminated buf to kstrtouint()
commit 9959ba0c241a71c7ed8133401cfbbee2720da0b5 upstream. The 'buf' is prepared with null termination with intention of using it for this purpose, but 'name' is passed instead! Signed-off-by: Malahal Naineni <malahal@us.ibm.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4idmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
index fdc91a6fc9c4..ccfe0d0e7228 100644
--- a/fs/nfsd/nfs4idmap.c
+++ b/fs/nfsd/nfs4idmap.c
@@ -598,7 +598,7 @@ numeric_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namel
/* Just to make sure it's null-terminated: */
memcpy(buf, name, namelen);
buf[namelen] = '\0';
- ret = kstrtouint(name, 10, id);
+ ret = kstrtouint(buf, 10, id);
return ret == 0;
}