Use proper endian conversions.
Obtained from: Mac OS X MFC after: 1 week
This commit is contained in:
parent
31201790ba
commit
618d5e9216
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=82037
@ -68,7 +68,7 @@ enum smb_dialects {
|
||||
*/
|
||||
#define SMB_SIGNATURE "\xFFSMB"
|
||||
#define SMB_SIGLEN 4
|
||||
#define SMB_HDRMID(p) (*(u_short*)((u_char*)(p) + 30))
|
||||
#define SMB_HDRMID(p) (letohs(*(u_short*)((u_char*)(p) + 30)))
|
||||
#define SMB_HDRLEN 32
|
||||
/*
|
||||
* bits in the smb_flags field
|
||||
|
@ -238,7 +238,7 @@ smb_rq_bend(struct smb_rq *rqp)
|
||||
bcnt = rqp->sr_rq.mb_count;
|
||||
if (bcnt > 0xffff)
|
||||
SMBERROR("byte count too large (%d)\n", bcnt);
|
||||
*rqp->sr_bcount = bcnt;
|
||||
*rqp->sr_bcount = htoles(bcnt);
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user