From 1d855265e7d2b87f534c3ce1a799fb5ccff8ccba Mon Sep 17 00:00:00 2001 From: Amir Abbas Mousavian Date: Sun, 6 Oct 2024 08:53:57 +0330 Subject: [PATCH] Fix pwrite offset encoding --- lib/smb2-cmd-write.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/smb2-cmd-write.c b/lib/smb2-cmd-write.c index e8892cf3..51618705 100644 --- a/lib/smb2-cmd-write.c +++ b/lib/smb2-cmd-write.c @@ -79,6 +79,7 @@ smb2_encode_write_request(struct smb2_context *smb2, smb2_set_uint16(iov, 0, SMB2_WRITE_REQUEST_SIZE); smb2_set_uint16(iov, 2, SMB2_HEADER_SIZE + 48); smb2_set_uint32(iov, 4, req->length); + smb2_set_uint64(iov, 8, req->offset); memcpy(iov->buf + 16, req->file_id, SMB2_FD_SIZE); smb2_set_uint32(iov, 32, req->channel); smb2_set_uint32(iov, 36, req->remaining_bytes);