diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-04-17 18:44:48 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-04-17 18:44:48 +0200 |
commit | 22bbb0ebe67bc1eb4014d399edcf03340fd6c803 (patch) | |
tree | 28a62f0221e2c499ee108c205567033dbafa54da /source4/libcli/smb2/request.c | |
parent | c9a12fa55d63e4bccb5b453186022dae1da39032 (diff) | |
parent | 3180cbbc5b3396da07c325166e472b143b3abe1e (diff) | |
download | samba-22bbb0ebe67bc1eb4014d399edcf03340fd6c803.tar.gz samba-22bbb0ebe67bc1eb4014d399edcf03340fd6c803.tar.bz2 samba-22bbb0ebe67bc1eb4014d399edcf03340fd6c803.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit 43fc10aaa7c3d50cb9fee5ecab859103aec4a62e)
Diffstat (limited to 'source4/libcli/smb2/request.c')
-rw-r--r-- | source4/libcli/smb2/request.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/libcli/smb2/request.c b/source4/libcli/smb2/request.c index 2471fcaa4d..f52b0ceef2 100644 --- a/source4/libcli/smb2/request.c +++ b/source4/libcli/smb2/request.c @@ -211,10 +211,10 @@ bool smb2_oob(struct smb2_request_buffer *buf, const uint8_t *ptr, size_t size) return false; } /* be careful with wraparound! */ - if (ptr < buf->body || - ptr >= buf->body + buf->body_size || + if ((uintptr_t)ptr < (uintptr_t)buf->body || + (uintptr_t)ptr >= (uintptr_t)buf->body + buf->body_size || size > buf->body_size || - ptr + size > buf->body + buf->body_size) { + (uintptr_t)ptr + size > (uintptr_t)buf->body + buf->body_size) { return true; } return false; @@ -669,7 +669,7 @@ NTSTATUS smb2_push_o16s16_string(struct smb2_request_buffer *buf, } if (*str == 0) { - blob.data = str; + blob.data = discard_const(str); blob.length = 0; return smb2_push_o16s16_blob(buf, ofs, blob); } |