Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ func (srv *Server) handle(req sshfx.Packet, hint []byte, maxDataLen uint32) (ssh
return nil, fmt.Errorf("read length request too large: %d", req.Length)
}

n, err := file.ReadAt(hint, int64(req.Offset))
n, err := file.ReadAt(hint[:req.Length], int64(req.Offset))
if err != nil {
// We cannot return results AND a status like SSH_FX_EOF,
// so we return io.EOF only if we didn't read anything at all.
Expand Down