summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorBharath SM <bharathsm@microsoft.com>2025-06-19 18:35:33 +0300
committerSteve French <stfrench@microsoft.com>2025-06-21 19:03:25 +0300
commit4d360cfe8cbac3b62bd9e1df9889bde8a9d5b1d7 (patch)
treecbd23dce18687797e12828d3cd06198212b48262 /fs
parent4eb11a34b72c86d559f437fdadc47e512bba41d2 (diff)
downloadlinux-4d360cfe8cbac3b62bd9e1df9889bde8a9d5b1d7.tar.xz
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/smb/client/cifs_debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
index c0196be0e65f..3fdf75737d43 100644
--- a/fs/smb/client/cifs_debug.c
+++ b/fs/smb/client/cifs_debug.c
@@ -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;