]> git.ipfire.org Git - thirdparty/samba.git/commit
libcli/smb: Fix failure of Smb3UnixTests.test_create_context_reparse
authorNoel Power <noel.power@suse.com>
Wed, 28 Aug 2024 15:19:27 +0000 (16:19 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 28 Aug 2024 18:38:01 +0000 (18:38 +0000)
commit56c48154028207a831242fe6f4ca28fb64b60faf
tree70de464a3a2970321fadc39b6e45dd12da849416
parent5e278a52646a48e3671270e5b57ec5b852f9fb4b
libcli/smb: Fix failure of Smb3UnixTests.test_create_context_reparse

On tumbleweed at least the definition in py_reparse_put of 'reserved' as
'unsigned' causes the tag value to be overwritten. Note: ParseTuple is
given a format of 'Kk' where
  K = unsigned long long (for tag)
  k = unsigned long      (for reserved)

The problem is 'reserved' is defined as 'unsigned' which on a
64 bit linux system has size 4. The size however of the 'unsigned long' type
on the same 64 bit system is 8. This causes 'tag' to be overwritten by
the value of 'reserved' because it's destination size is smaller than
expected.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15702
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Aug 28 18:38:01 UTC 2024 on atb-devel-224
libcli/smb/py_reparse_symlink.c