From 24309bdb2efca36375f3c833f72ebec3908d31fd Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 14 Sep 2009 19:09:54 -0700 Subject: Second part of bug fix for 6606. s3:libsmb: Fix bug 6606 -- short reads in smbclient were not handled --- source3/libsmb/clireadwrite.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/libsmb') diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c index b6901961d0..6342de484c 100644 --- a/source3/libsmb/clireadwrite.c +++ b/source3/libsmb/clireadwrite.c @@ -287,6 +287,12 @@ static void cli_readall_done(struct tevent_req *subreq) return; } + if (received == 0) { + /* EOF */ + tevent_req_done(req); + return; + } + if ((state->received == 0) && (received == state->size)) { /* Ideal case: Got it all in one run */ state->buf = buf; -- cgit