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 error="runtime error: slice bounds out of range" while match for geo json #39

Closed
MoonJustry opened this issue Aug 18, 2019 · 2 comments
Assignees

Comments

@MoonJustry
Copy link

Attach the file for which the detection is inaccurate
while call DetectReader or DetectFile while the in 2048(matchers.ReadLimit) bytes starts with '{' and ends with "type" like in[0] = '{' and in[2042:] = "type" or call Detect like this case, panic~~

Expected mime type
application/json

Returned mime type
panic

Output of go version
go1.12.4

Additional context
.

function GeoJson looks like it should check slice bounds is discussed,and node.match to recovery panic, Instead of throwing exceptions directly to the caller

@gabriel-vasile
Copy link
Owner

Hi! I was able to reproduce the problem and published a release to fix the panic.

@MoonJustry
Copy link
Author

👍

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

2 participants