This repository was archived by the owner on Mar 29, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
This repository was archived by the owner on Mar 29, 2026. It is now read-only.
slice bounds out of range #1
Copy link
Copy link
Open
Description
Hi !
I'm trying to connect to a OFTP2 endpoint, it seems to work until i've got an error :
<-- IODETTE FTP READY
--> X5LOCAL 10240SYXS959L
<-- F06
panic: runtime error: slice bounds out of range [:6] with capacity 4
goroutine 1 [running]:
github.com/thomsmits/oftp2-client/internal/liboftp2/wire.(*Buffer).GetBytes(...)
/workspace/OFTP/internal/liboftp2/wire/buffer.go:104
github.com/thomsmits/oftp2-client/internal/liboftp2/wire.(*Buffer).GetString(0xc00001f6f4?, 0xc000052a50?)
/workspace/OFTP/internal/liboftp2/wire/buffer.go:47 +0x7c
github.com/thomsmits/oftp2-client/internal/liboftp2/wire.(*Buffer).GetNumInt(0xc000012420?, 0x711d74?)
/workspace/OFTP/internal/liboftp2/wire/buffer.go:56 +0x19
github.com/thomsmits/oftp2-client/internal/liboftp2/wire/session.(*ESID).Parse(0xc000012408, {0xc00001f6cc, 0x4, 0x4})
/workspace/OFTP/internal/liboftp2/wire/session/esid.go:181 +0xb0
github.com/thomsmits/oftp2-client/internal/liboftp2/client.DetermineMessageType({0xc00001f6cc, 0x4, 0x4})
/workspace/OFTP/internal/liboftp2/client/selector.go:29 +0x2fe
github.com/thomsmits/oftp2-client/internal/liboftp2/client.(*OFTP2Client).internalQueryServerCapabilities(0xc000159c28, 0x0)
/workspace/OFTP/internal/liboftp2/client/client_queryServer.go:42 +0x173
github.com/thomsmits/oftp2-client/internal/liboftp2/client.(*OFTP2Client).QueryServerCapabilities(0xc000068300?)
/workspace/OFTP/internal/liboftp2/client/client_queryServer.go:90 +0x85
github.com/thomsmits/oftp2-client/cmd/oftp2/cmd.determineId()
/workspace/OFTP/cmd/oftp2/cmd/id.go:30 +0x128
github.com/thomsmits/oftp2-client/cmd/oftp2/cmd.glob..func1(0x941b60?, {0x712100?, 0x5?, 0x5?})
/workspace/OFTP/cmd/oftp2/cmd/id.go:17 +0x17
github.com/spf13/cobra.(*Command).execute(0x941b60, {0xc0000720f0, 0x5, 0x5})
/root/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:854 +0x663
github.com/spf13/cobra.(*Command).ExecuteC(0x9420a0)
/root/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x39d
github.com/spf13/cobra.(*Command).Execute(...)
/root/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895
github.com/thomsmits/oftp2-client/cmd/oftp2/cmd.Execute()
/workspace/OFTP/cmd/oftp2/cmd/root.go:31 +0x25
main.main()
/workspace/OFTP/cmd/oftp2/main.go:17 +0x17
exit status 2
Any idea how i could fix this ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels