s3:g_lock: Do not let pointers to point outside the input buffer
If num_shared == 0 the shared points at the address outside the buf.
Make it NULL instead.
(gdb) p *lck
$33 = {
exclusive = {
pid =
1187098,
task_id = 0,
vnn =
4294967295,
unique_id =
7349874180613937639
},
num_shared = 0,
shared = 0x555555646980 "@kdUUU",
unique_lock_epoch =
1489043017590848833,
unique_data_epoch =
11232048132975083808,
datalen = 0,
data = 0x555555646980 "@kdUUU"
}
Same for datalen & data.
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Sat Oct 5 14:44:46 UTC 2024 on atb-devel-224