Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when client request create smbFile. smb panic slice bounds out of range [:64] with capacity 47 #2

Open
fengyingkong opened this issue Jan 17, 2023 · 0 comments

Comments

@fengyingkong
Copy link

debugserver-@(#)PROGRAM:LLDB PROJECT:lldb-1205.0.27
for x86_64.
Got a connection, launched process /Users/cs/Document/golang/smb/bin/smb (pid = 97302).
panic: runtime error: slice bounds out of range [:64] with capacity 47

goroutine 20 [running]:
github.com/gentlemanautomaton/smb/smbpacket.Request.Header(0xc000100100, 0x2f, 0x2f, 0x0, 0x0, 0x0)
/Users/cs/go/pkg/mod/github.com/gentlemanautomaton/[email protected]/smbpacket/request.go:8 +0x6d
main.main.func1.1(0x119f610, 0xc0001000f0, 0xc000054dd0, 0x17b5fa0, 0xc00011c720, 0x0)
/Users/cs/Documents/golang/smb/cmd/smbserve/main.go:60 +0x146
main.main.func1(0x119fe00, 0xc00013c0c0, 0x119f640, 0xc0001000a0, 0xffff00000000, 0xc0e9ad6c8a058d40, 0x1b8888615, 0x1249b40, 0x0, 0x0, ...)
/Users/cs/Documents/golang/smb/cmd/smbserve/main.go:125 +0x399
github.com/gentlemanautomaton/smb/smbserver.HandlerFunc.ServeSMB(0xc00013c080, 0x119fe00, 0xc00013c0c0, 0x119f640, 0xc0001000a0, 0xffff00000000, 0xc0e9ad6c8a058d40, 0x1b8888615, 0x1249b40, 0x0, ...)
/Users/cs/go/pkg/mod/github.com/gentlemanautomaton/[email protected]/smbserver/handler.go:13 +0x55
github.com/gentlemanautomaton/smb/smbserver.Server.serve(0x119e900, 0xc00013c080, 0xec4e1eacdbfb157c, 0x669646c5a582f1a3, 0x119fe00, 0xc00013c0c0)
/Users/cs/go/pkg/mod/github.com/gentlemanautomaton/[email protected]/smbserver/server.go:53 +0x1d5
created by github.com/gentlemanautomaton/smb/smbserver.Server.Serve
/Users/cs/go/pkg/mod/github.com/gentlemanautomaton/[email protected]/smbserver/server.go:47 +0x249
Exiting.

Debugger finished with exit code 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant