From aff7a1fde6c96e37c1a487ba46f89d7ba97b8aa7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 4 Dec 2024 16:06:10 +0100 Subject: [PATCH] smbd: Simplify smb_set_file_end_of_file_info() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Volker Lendecke Reviewed-by: Pavel Filipenský --- source3/smbd/smb2_trans2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 2c2bc7e7970..4df3cc0eab1 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -5052,8 +5052,7 @@ static NTSTATUS smb_set_file_end_of_file_info(connection_struct *conn, return NT_STATUS_INVALID_PARAMETER; } - size = IVAL(pdata,0); - size |= (((off_t)IVAL(pdata,4)) << 32); + size = (off_t)PULL_LE_U64(pdata, 0); DBG_DEBUG("Set end of file info for file %s to %ju\n", smb_fname_str_dbg(smb_fname), (uintmax_t)size); -- 2.47.3