Skip to content

Commit 4d360cf

Browse files
bharathsm-mssmfrench
authored andcommitted
smb: minor fix to use sizeof to initialize flags_string buffer
Replaced hardcoded length with sizeof(flags_string). Reviewed-by: Paulo Alcantara (Red Hat) <[email protected]> Signed-off-by: Bharath SM <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 4eb11a3 commit 4d360cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/cifs_debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
11051105
if ((count < 1) || (count > 11))
11061106
return -EINVAL;
11071107

1108-
memset(flags_string, 0, 12);
1108+
memset(flags_string, 0, sizeof(flags_string));
11091109

11101110
if (copy_from_user(flags_string, buffer, count))
11111111
return -EFAULT;

0 commit comments

Comments
 (0)