diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-01-27 11:48:11 +1100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-01-27 13:36:06 -0800 |
commit | 7d14f89e29ac96227aca9af5f3deba38182618ce (patch) | |
tree | bc7b51de273afbbe7a5a650935e9c49bf8b17e08 /source3 | |
parent | 0027cd2409492a250fb825927596a2dd9b08d75d (diff) | |
download | samba-7d14f89e29ac96227aca9af5f3deba38182618ce.tar.gz samba-7d14f89e29ac96227aca9af5f3deba38182618ce.tar.bz2 samba-7d14f89e29ac96227aca9af5f3deba38182618ce.zip |
s3-libsmb Do not limit read replies to NBT packet sizes
With the posix extensions, we can read 16MB at a time, so we need to check
the full size of the packet, not the size rounded down to the old NBT
limit.
Andrew Bartlett
Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clireadwrite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 2a39edfbe2..8e845ee637 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -244,7 +244,7 @@ static void cli_read_andx_done(struct tevent_req *subreq) state->buf = discard_const_p(uint8_t, smb_base(inbuf)) + SVAL(vwv+6, 0); - if (trans_oob(smb_len(inbuf), SVAL(vwv+6, 0), state->received) + if (trans_oob(smb_len_tcp(inbuf), SVAL(vwv+6, 0), state->received) || ((state->received != 0) && (state->buf < bytes))) { DEBUG(5, ("server returned invalid read&x data offset\n")); tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE); |