mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-19 12:49:10 +08:00
smb: minor fix to use sizeof to initialize flags_string buffer
Replaced hardcoded length with sizeof(flags_string). Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org> Signed-off-by: Bharath SM <bharathsm@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
@@ -1105,7 +1105,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
|
||||
if ((count < 1) || (count > 11))
|
||||
return -EINVAL;
|
||||
|
||||
memset(flags_string, 0, 12);
|
||||
memset(flags_string, 0, sizeof(flags_string));
|
||||
|
||||
if (copy_from_user(flags_string, buffer, count))
|
||||
return -EFAULT;
|
||||
|
||||
Reference in New Issue
Block a user