From d4c8b92a29aa9dcc976185aeb35ead8e911aab9c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 23 May 2011 12:21:17 +0200 Subject: [PATCH] s3: Remove two false references to cli->inbuf (cherry picked from commit b1a7bdb93c7fda54a29284f1691de1dc4f3bbf6b) Fix bug #8159 (Memory corruption in fetching cli->server_domain from the server.). --- source3/libsmb/cliconnect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 9cebab734eb..97dd06886f6 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2655,10 +2655,10 @@ static void cli_negprot_done(struct tevent_req *subreq) } /* work out if they sent us a workgroup */ if (!(cli->capabilities & CAP_EXTENDED_SECURITY) && - smb_buflen(cli->inbuf) > 8) { + smb_buflen(inbuf) > 8) { ssize_t ret; status = smb_bytes_talloc_string( - cli, (char *)cli->inbuf, &cli->server_domain, + cli, (char *)inbuf, &cli->server_domain, bytes + 8, num_bytes - 8, &ret); if (tevent_req_nterror(req, status)) { return; -- 2.11.4.GIT