From 8c27bd6b1f107c09ce5059b764a69861341e94d5 Mon Sep 17 00:00:00 2001 From: moloch-- <875022+moloch--@users.noreply.github.com> Date: Thu, 22 Apr 2021 10:07:42 -0500 Subject: [PATCH] Avoid name confusion in upload handler --- implant/sliver/handlers/handlers.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/implant/sliver/handlers/handlers.go b/implant/sliver/handlers/handlers.go index c816b9e571..9a73bd6f9d 100644 --- a/implant/sliver/handlers/handlers.go +++ b/implant/sliver/handlers/handlers.go @@ -329,12 +329,12 @@ func uploadHandler(data []byte, resp RPCResponse) { } else { // Create file, write data to file system defer f.Close() - var data []byte + var uploadData []byte var err error if uploadReq.Encoder == "gzip" { - data, err = gzipRead(uploadReq.Data) + uploadData, err = gzipRead(uploadReq.Data) } else { - data = uploadReq.Data + uploadData = uploadReq.Data } // Check for decode errors if err != nil { @@ -342,7 +342,7 @@ func uploadHandler(data []byte, resp RPCResponse) { Err: fmt.Sprintf("%v", err), } } else { - f.Write(data) + f.Write(uploadData) } }