]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/smb: make the last 2 reserved bytes explicit in smb2_lease_push()
authorStefan Metzmacher <metze@samba.org>
Wed, 16 Apr 2025 13:18:12 +0000 (15:18 +0200)
committerJule Anger <janger@samba.org>
Thu, 17 Apr 2025 15:59:12 +0000 (15:59 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15849

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
(cherry picked from commit cbe438eb1a3c44f5cd46c5e685da9964da64f892)

libcli/smb/smb2_lease.c

index 02b0cfa8dc5a050e66d6f586e21d55b328081bd9..4631b867949d2678f89c4d40591c60dcd6ce6ca2 100644 (file)
@@ -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;