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

Integer Overflow in ravi_create_slice #207

Open
XmiliaH opened this issue Feb 13, 2021 · 1 comment
Open

Integer Overflow in ravi_create_slice #207

XmiliaH opened this issue Feb 13, 2021 · 1 comment

Comments

@XmiliaH
Copy link
Contributor

XmiliaH commented Feb 13, 2021

There is an integer overflow in ravi_create_slice at:

ravi/src/lapi.c

Line 903 in 56a59a1

if (start < 1 || start + len > orig->len) {
This can result in slices with a length or index that exceeds that of the parent as can be seen in the following sample that segfaults.

local t = table.intarray(3)
local slice = table.slice(t, 2, 0xFFFFFFFE)
slice[0xFFFFFFF] = 1
@dibyendumajumdar
Copy link
Owner

Thank you for the report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants