Skip to content

Commit

Permalink
Avoid name confusion in upload handler
Browse files Browse the repository at this point in the history
  • Loading branch information
moloch-- committed Apr 22, 2021
1 parent 308c695 commit 8c27bd6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions implant/sliver/handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,20 +329,20 @@ 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 {
upload.Response = &commonpb.Response{
Err: fmt.Sprintf("%v", err),
}
} else {
f.Write(data)
f.Write(uploadData)
}
}

Expand Down

0 comments on commit 8c27bd6

Please sign in to comment.