8000 fix nil panic error when sshFxpExtendedPacket could not UnmarshalBina… · etherscan-io/sftp@3f23d59 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f23d59

Browse files
committed
fix nil panic error when sshFxpExtendedPacket could not UnmarshalBinary ExtendedRequest
1 parent 84e6527 commit 3f23d59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

request-server.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ func (rs *RequestServer) packetWorker(
159159
) error {
160160
for pkt := range pktChan {
161161
if epkt, ok := pkt.requestPacket.(*sshFxpExtendedPacket); ok {
162-
pkt.requestPacket = epkt.SpecificPacket
162+
if epkt.SpecificPacket != nil {
163+
pkt.requestPacket = epkt.SpecificPacket
164+
}
163165
}
164166

165167
var rpkt responsePacket

0 commit comments

Comments
 (0)
0