mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
NFSD: pass null terminated buf to kstrtouint()
commit 9959ba0c24
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>
This commit is contained in:
parent
17170f0bbf
commit
2bb06038d0
1 changed files with 1 additions and 1 deletions
|
@ -581,7 +581,7 @@ numeric_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namel
|
||||||
/* Just to make sure it's null-terminated: */
|
/* Just to make sure it's null-terminated: */
|
||||||
memcpy(buf, name, namelen);
|
memcpy(buf, name, namelen);
|
||||||
buf[namelen] = '\0';
|
buf[namelen] = '\0';
|
||||||
ret = kstrtouint(name, 10, id);
|
ret = kstrtouint(buf, 10, id);
|
||||||
return ret == 0;
|
return ret == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue