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

panic: runtime error: index out of range #97

Closed
Metalnem opened this issue Jul 20, 2017 · 1 comment · Fixed by #98
Closed

panic: runtime error: index out of range #97

Metalnem opened this issue Jul 20, 2017 · 1 comment · Fixed by #98

Comments

@Metalnem
Copy link

Function parseListLine panics when called with the argument "000000000x " (notice the space at the end).

panic: runtime error: index out of range

goroutine 1 [running]:
github.com/jlaffaye/ftp.parseHostedFTPLine(0x10e3042, 0xb, 0x114c200, 0xc4200107d0, 0xc420010701)
	/Users/Metalnem/Go/src/github.com/jlaffaye/ftp/parse.go:196 +0x24a
github.com/jlaffaye/ftp.parseListLine(0x10e3042, 0xb, 0xc4200107d0, 0x0, 0x0)
	/Users/Metalnem/Go/src/github.com/jlaffaye/ftp/parse.go:209 +0x68
github.com/jlaffaye/ftp.SuperParseLine(0x10e3042, 0xb, 0xc420014630, 0x29, 0xc420014630)
	/Users/Metalnem/Go/src/github.com/jlaffaye/ftp/parse.go:218 +0x35
main.main()
	/Users/Metalnem/Go/src/github.com/jlaffaye/ftp/main/main.go:12 +0x3a
exit status 2

This bug was found with the help of go-fuzz.

corny added a commit to digineo/ftp that referenced this issue Jul 20, 2017
@corny
Copy link
Contributor

corny commented Jul 20, 2017

Nice tool! We should add it to our automated test.

catalint pushed a commit to catalint/ftp that referenced this issue Aug 11, 2017
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

Successfully merging a pull request may close this issue.

2 participants