diff options
author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-08-06 03:03:49 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-08-15 12:17:05 +0200 |
commit | 73e47d0967fc8a7524a1f773771dccc57a6f1078 (patch) | |
tree | 1aef375051cd05b01fa295f8d038d9dc374875a7 /drivers/platform/x86/intel/pmt/class.c | |
parent | f1ce9258bcbce2491f9f71f7882b6eed0b33ec65 (diff) |
smb: server: Fix extension string in ksmbd_extract_shortname()
commit 8e7d178d06e8937454b6d2f2811fa6a15656a214 upstream.
In ksmbd_extract_shortname(), strscpy() is incorrectly called with the
length of the source string (excluding the NUL terminator) rather than
the size of the destination buffer. This results in "__" being copied
to 'extension' rather than "___" (two underscores instead of three).
Use the destination buffer size instead to ensure that the string "___"
(three underscores) is copied correctly.
Cc: stable@vger.kernel.org
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions