mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02: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:
parent
4eb11a34b7
commit
4d360cfe8c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user