libsmb: Don't mess up pathnames in cli_smb2_create_fnum_send()
authorVolker Lendecke <vl@samba.org>
Thu, 15 Dec 2022 18:06:20 +0000 (19:06 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 15 Dec 2022 21:52:34 +0000 (21:52 +0000)
commit7fcbae4e4940c8d89717c4fa4199d57d69c1d3a4
tree0010b271ec1e9c97834ffb75ed13c7cf5d56af43
parent17bbd6ec4c2607afeadd91a29c245054a6ca6828
libsmb: Don't mess up pathnames in cli_smb2_create_fnum_send()

Master-only bug introduced with dd9cdfb3b14: smb2_dfs_share_path() can
change the length of fname, and if it happens that the original length
hits a \ in the enlarged filename, we cut it off.

Found by accident, this really made me scratch my head when looking at
traces :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/cli_smb2_fnum.c