diff options
author | Volker Lendecke <vl@samba.org> | 2008-03-18 13:20:10 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-03-18 13:49:46 +0100 |
commit | 16cbc22a99c0a302d248dc006ac0016042c1e3ec (patch) | |
tree | 6a1e98392cf2379eb4737cb7a6318cc5c7b844a2 /source3/libsmb | |
parent | c5356479c1953b15fee8097d5d3436204fc7a4ce (diff) | |
download | samba-16cbc22a99c0a302d248dc006ac0016042c1e3ec.tar.gz samba-16cbc22a99c0a302d248dc006ac0016042c1e3ec.tar.bz2 samba-16cbc22a99c0a302d248dc006ac0016042c1e3ec.zip |
Fix bug 5334
I did not test with a zero length file :-)
(This used to be commit 7d7a73944c2dcf078f7bc8de65d575f32f9aa851)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clireadwrite.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index 9bd8170673..13c024a264 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -262,6 +262,14 @@ struct async_req *cli_pull_send(TALLOC_CTX *mem_ctx, struct cli_state *cli, state->pushed = 0; state->top_req = 0; + + if (size == 0) { + if (!async_post_status(result, NT_STATUS_OK)) { + goto failed; + } + return result; + } + state->chunk_size = cli_read_max_bufsize(cli); state->num_reqs = MAX(window_size/state->chunk_size, 1); |