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

Negative array index causes panic #2

Closed
maja42 opened this issue Jun 19, 2018 · 1 comment
Closed

Negative array index causes panic #2

maja42 opened this issue Jun 19, 2018 · 1 comment

Comments

@maja42
Copy link

maja42 commented Jun 19, 2018

When accessing an array like this:

arr[-1]

... I expect jsonpath to return an error. Instead it panics (range error).
In evaluable.go (line 105), only the array length (upper limit) is checked, but not if the index is negative.

generikvault added a commit that referenced this issue Sep 26, 2018
@generikvault
Copy link
Collaborator

I've added some testcases for this issue. It seems to bne already fixed.
Sry for the slow response.

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