From: Bharath SM Date: Thu, 19 Jun 2025 15:35:33 +0000 (+0530) Subject: smb: minor fix to use sizeof to initialize flags_string buffer X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=4d360cfe8cbac3b62bd9e1df9889bde8a9d5b1d7;p=linux-block.git smb: minor fix to use sizeof to initialize flags_string buffer Replaced hardcoded length with sizeof(flags_string). Reviewed-by: Paulo Alcantara (Red Hat) Signed-off-by: Bharath SM Signed-off-by: Steve French --- 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;