aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBharath SM <bharathsm@microsoft.com>2025-06-19 21:05:33 +0530
committerSteve French <stfrench@microsoft.com>2025-06-21 11:03:25 -0500
commit4d360cfe8cbac3b62bd9e1df9889bde8a9d5b1d7 (patch)
treecbd23dce18687797e12828d3cd06198212b48262
parentsmb: Use loff_t for directory position in cached_dirents (diff)
downloadwireguard-linux-4d360cfe8cbac3b62bd9e1df9889bde8a9d5b1d7.tar.xz
wireguard-linux-4d360cfe8cbac3b62bd9e1df9889bde8a9d5b1d7.zip
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>
-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;