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 in substring when offset is outside bounds #1235

Closed
tsandall opened this issue Feb 23, 2019 · 0 comments
Closed

panic in substring when offset is outside bounds #1235

tsandall opened this issue Feb 23, 2019 · 0 comments
Labels

Comments

@tsandall
Copy link
Member

The substring built-in function is not checking the start offset properly. A negative offset or an offset greater than the length of the string result in a panic.

@tsandall tsandall added the bug label Feb 23, 2019
tsandall added a commit to tsandall/opa that referenced this issue Feb 23, 2019
The bounds checking on the substring function was not checking the
start offset properly. Negative offsets are not supported for now. In
the future we can relax this.

Fixes open-policy-agent#1235

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
tsandall added a commit that referenced this issue Feb 23, 2019
The bounds checking on the substring function was not checking the
start offset properly. Negative offsets are not supported for now. In
the future we can relax this.

Fixes #1235

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant