From a1d2c6f9c1d96161836b7abf902b7699638cb060 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 27 Jan 2012 16:03:55 -0800 Subject: [PATCH] Fix for bug #8727 - smbclient fails with posix large reads. 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. Signed-off-by: Jeremy Allison --- 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 215e1d3..83531a5 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -215,7 +215,7 @@ static void cli_read_andx_done(struct tevent_req *subreq) state->buf = (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_large(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); -- 1.7.7.3