summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4idmap.c
diff options
context:
space:
mode:
authorMalahal Naineni <malahal@us.ibm.com>2012-09-09 17:25:47 +0200
committerJ. Bruce Fields <bfields@redhat.com>2012-09-10 23:46:19 +0200
commit9959ba0c241a71c7ed8133401cfbbee2720da0b5 (patch)
treeda5f7373f5751f9eec3cac5c9ef6ba5fa1dcffbc /fs/nfsd/nfs4idmap.c
parentnfsd: remove duplicate init in nfsd4_cb_recall (diff)
downloadlinux-9959ba0c241a71c7ed8133401cfbbee2720da0b5.tar.xz
linux-9959ba0c241a71c7ed8133401cfbbee2720da0b5.zip
NFSD: pass null terminated buf to kstrtouint()
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> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4idmap.c')
-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 11df4aca89ba..a1f10c0a6255 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;
}