From 2342219d699eb17d48a2b31c297121a158ba85d0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 6 Feb 2007 18:16:10 +0000 Subject: r21183: Commit the big/little endian fix for nttrans setup[] handling. Please check! For code symmetry reasons, trans2 might also see this fix, but this is left to the interested reader :-) Volker (This used to be commit f2d364ebe69fc5d624e456cc7d941071811a5567) --- source4/smb_server/smb/nttrans.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source4/smb_server/smb/nttrans.c') diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c index fce4fdc129..e85da29806 100644 --- a/source4/smb_server/smb/nttrans.c +++ b/source4/smb_server/smb/nttrans.c @@ -570,7 +570,6 @@ void smbsrv_reply_nttrans(struct smbsrv_request *req) { struct nttrans_op *op; struct smb_nttrans *trans; - int i; uint16_t param_ofs, data_ofs; uint16_t param_count, data_count; uint16_t param_total, data_total; @@ -617,9 +616,9 @@ void smbsrv_reply_nttrans(struct smbsrv_request *req) smbsrv_send_error(req, NT_STATUS_NO_MEMORY); return; } - for (i=0;iin.setup_count;i++) { - trans->in.setup[i] = SVAL(req->in.vwv, VWV(19+i)); - } + + memcpy(trans->in.setup, (char *)(req->in.vwv) + VWV(19), + sizeof(uint16_t) * trans->in.setup_count); if (!req_pull_blob(req, req->in.hdr + param_ofs, param_count, &trans->in.params) || !req_pull_blob(req, req->in.hdr + data_ofs, data_count, &trans->in.data)) { -- cgit