You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not good if the pattern is user supplied.
What steps will reproduce the problem?
func TestMatch(t *testing.T) {
_, _ = filepath.Match("[", "a")
}
What is the expected output?
error: ErrBadPattern
What do you see instead?
=== RUN TestMatch
--- FAIL: TestMatch (0.00 seconds)
panic: runtime error: index out of range [recovered]
panic: runtime error: index out of range
goroutine 7 [running]:
testing.func·004()
/usr/local/go/src/pkg/testing/testing.go:348 +0x105
path/filepath.matchChunk(0x811c6e9, 0x1, 0x811c8f9, 0x0, 0x0, ...)
/usr/local/go/src/pkg/path/filepath/match.go:136 +0x315
path/filepath.Match(0x811c6e9, 0x0, 0x811c8f8, 0x1, 0x18365008, ...)
/usr/local/go/src/pkg/path/filepath/match.go:55 +0xe6
Which compiler are you using (5g, 6g, 8g, gccgo)?
go test
Which operating system are you using?
linux/i386
Which version are you using? (run 'go version')
go version go1.1 linux/386
The text was updated successfully, but these errors were encountered:
by ndecker.de:
The text was updated successfully, but these errors were encountered: