From: Stefan Metzmacher Date: Wed, 16 Apr 2025 13:18:12 +0000 (+0200) Subject: libcli/smb: make the last 2 reserved bytes explicit in smb2_lease_push() X-Git-Tag: samba-4.22.1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9a02bb284ac0530918955a91a9d764a38ad5b51;p=thirdparty%2Fsamba.git libcli/smb: make the last 2 reserved bytes explicit in smb2_lease_push() BUG: https://bugzilla.samba.org/show_bug.cgi?id=15849 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Reviewed-by: Björn Jacke (cherry picked from commit cbe438eb1a3c44f5cd46c5e685da9964da64f892) --- diff --git a/libcli/smb/smb2_lease.c b/libcli/smb/smb2_lease.c index 02b0cfa8dc5..4631b867949 100644 --- a/libcli/smb/smb2_lease.c +++ b/libcli/smb/smb2_lease.c @@ -87,7 +87,8 @@ bool smb2_lease_push(const struct smb2_lease *lease, uint8_t *buf, size_t len) if (version == 2) { memcpy(&buf[32], &lease->parent_lease_key, 16); - SIVAL(buf, 48, lease->lease_epoch); + SSVAL(buf, 48, lease->lease_epoch); + SSVAL(buf, 50, 0); /* reserved */ } return true;