espelhamento de
https://github.com/maxgoedjen/secretive.git
sincronizado 2025-12-25 19:17:13 +01:00
Guard + copy
Esse commit está contido em:
pai
cda56ea14b
commit
e880e32ce9
@ -23,8 +23,8 @@ extension Agent {
|
||||
|
||||
public func handle(reader: FileHandleReader, writer: FileHandleWriter) {
|
||||
Logger().debug("Agent handling new data")
|
||||
let data = reader.availableData
|
||||
guard !data.isEmpty else { return }
|
||||
let data = Data(reader.availableData)
|
||||
guard data.count > 5 else { return }
|
||||
let requestTypeInt = data[4]
|
||||
guard let requestType = SSHAgent.RequestType(rawValue: requestTypeInt) else {
|
||||
writer.write(OpenSSHKeyWriter().lengthAndData(of: SSHAgent.ResponseType.agentFailure.data))
|
||||
|
||||
Carregando…
Referência em uma nova issue
Block a user