summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@cjr.nz>2022-08-19 17:00:19 -0300
committerSteve French <stfrench@microsoft.com>2022-08-24 12:22:24 -0500
commita1d2eb51f0a33c28f5399a1610e66b3fbd24e884 (patch)
tree2cceb306806d56593d3a2008841e3a190e989ff0 /.clang-format
parentba0803050d610d5072666be727bca5e03e55b242 (diff)
cifs: skip extra NULL byte in filenames
Since commit: cifs: alloc_path_with_tree_prefix: do not append sep. if the path is empty alloc_path_with_tree_prefix() function was no longer including the trailing separator when @path is empty, although @out_len was still assuming a path separator thus adding an extra byte to the final filename. This has caused mount issues in some Synology servers due to the extra NULL byte in filenames when sending SMB2_CREATE requests with SMB2_FLAGS_DFS_OPERATIONS set. Fix this by checking if @path is not empty and then add extra byte for separator. Also, do not include any trailing NULL bytes in filename as MS-SMB2 requires it to be 8-byte aligned and not NULL terminated. Cc: stable@vger.kernel.org Fixes: 7eacba3b00a3 ("cifs: alloc_path_with_tree_prefix: do not append sep. if the path is empty") Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions