]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cifs: Put explicit zero byte into SFU block/char types
authorPali Rohár <pali@kernel.org>
Thu, 12 Sep 2024 12:05:44 +0000 (14:05 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 15 Sep 2024 15:42:45 +0000 (10:42 -0500)
commitbb68327053a24734d5a146620f8a29219361dd3e
treefa8516c01626f7acd460fdd7bbae38322f8238b7
parentcf2ce67345d6a1af0853d8a7aef9ab8e6ea597d5
cifs: Put explicit zero byte into SFU block/char types

SFU types IntxCHR and IntxBLK are 8 bytes with zero as last byte. Make it
explicit in memcpy and memset calls, so the zero byte is visible in the
code (and not hidden as string trailing nul byte).

It is important for reader to show the last byte for block and char types
because it differs from the last byte of symlink type (which has it 0x01).

Also it is important to show that the type is not nul-term string, but
rather 8 bytes (with some printable bytes).

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/inode.c
fs/smb/client/smb2ops.c