From 3190cd15b697c1b14f92fcefc9893e1dc2dbf82a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 7 Dec 2017 18:12:28 +0100 Subject: [PATCH] smbd: Fix async large read We also do the 128k reads asynchronously, just not the huge 24MB ones. smb_setlen does not work well for >64k. Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider --- source3/smbd/aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c index d3611baae6a..4fc1132be87 100644 --- a/source3/smbd/aio.c +++ b/source3/smbd/aio.c @@ -305,7 +305,7 @@ static void aio_pread_smb1_done(struct tevent_req *req) (int)aio_ex->nbyte, (int)nread ) ); } - smb_setlen(outbuf, outsize - 4); + _smb_setlen_large(outbuf, outsize - 4); show_msg(outbuf); if (!srv_send_smb(aio_ex->smbreq->xconn, outbuf, true, aio_ex->smbreq->seqnum+1, -- 2.34.1