diff options
author | Volker Lendecke <vl@samba.org> | 2008-11-01 17:35:48 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-11-01 19:41:08 +0100 |
commit | 7bdb571ec4eea6689fa08f40be8b4c0133504f50 (patch) | |
tree | 065cb30f64d587e5fc40799e0dba394410ff3cef /source3/smbd/negprot.c | |
parent | ac97d7d4b023db8d0e0fef1dc7f2f7b88028eae3 (diff) | |
download | samba-7bdb571ec4eea6689fa08f40be8b4c0133504f50.tar.gz samba-7bdb571ec4eea6689fa08f40be8b4c0133504f50.tar.bz2 samba-7bdb571ec4eea6689fa08f40be8b4c0133504f50.zip |
Remove a bunch of direct inbuf references by adding "buf" to smb_request
Diffstat (limited to 'source3/smbd/negprot.c')
-rw-r--r-- | source3/smbd/negprot.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 84f111fb02..1fe0193e00 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -510,8 +510,7 @@ void reply_negprot(struct smb_request *req) size_t size = smb_len(req->inbuf) + 4; int choice= -1; int protocol; - char *p; - int bcc = SVAL(smb_buf(req->inbuf),-2); + const char *p; int arch = ARCH_ALL; int num_cliprotos; char **cliprotos; @@ -535,12 +534,12 @@ void reply_negprot(struct smb_request *req) return; } - p = smb_buf(req->inbuf) + 1; + p = (const char *)req->buf + 1; num_cliprotos = 0; cliprotos = NULL; - while (p < (smb_buf(req->inbuf) + bcc)) { + while (smb_bufrem(req->inbuf, p) > 0) { char **tmp; |