summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-03-09 16:47:21 -0800
committerJeremy Allison <jra@samba.org>2012-03-09 16:48:16 -0800
commit97e1652125a46ffbc1510b26abb0379d7df690d3 (patch)
tree87bf35f8ae47324f1a282c1d9a4caffdcc8e0b60
parent6e8e3c46130ce5882a3bd06bcccf4c383280e583 (diff)
downloadsamba-97e1652125a46ffbc1510b26abb0379d7df690d3.tar.gz
samba-97e1652125a46ffbc1510b26abb0379d7df690d3.tar.bz2
samba-97e1652125a46ffbc1510b26abb0379d7df690d3.zip
Fix up Christian Ambach's multi-credit code - the CreditCharge field is a 16-bit int read, not a 32-bit one.
-rw-r--r--source3/smbd/smb2_server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index c8afd9fa6c..3993673bcb 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -333,7 +333,7 @@ static bool smb2_validate_message_id(struct smbd_server_connection *sconn,
}
if (sconn->smb2.supports_multicredit) {
- credit_charge = IVAL(inhdr, SMB2_HDR_CREDIT_CHARGE);
+ credit_charge = SVAL(inhdr, SMB2_HDR_CREDIT_CHARGE);
credit_charge = MAX(credit_charge, 1);
}
@@ -1297,7 +1297,7 @@ NTSTATUS smbd_smb2_request_verify_creditcharge(struct smbd_smb2_request *req,
}
inhdr = (const uint8_t *)req->in.vector[i+0].iov_base;
- credit_charge = IVAL(inhdr, SMB2_HDR_CREDIT_CHARGE);
+ credit_charge = SVAL(inhdr, SMB2_HDR_CREDIT_CHARGE);
/* requests larger than 64 KB need credit charge */
if (credit_charge == 0 && data_length > 65536) {