dibyendumajumdar / ravi

Ravi is a dialect of Lua, featuring limited optional static typing, JIT and AOT compilers

Home Page:http://ravilang.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Integer Overflow in raviH_new_integer_array

XmiliaH opened this issue · comments

There is an integer overflow in raviH_new_integer_array at

ravi_resize_array(L, t, len + 1, 0);

When the requested array size is 0xFFFFFFFF the array being allocated is of size 0 but the initialization will segfault as can be seen from running table.intarray(0xFFFFFFFF).

The same holds for the raviH_new_number_array function.

Thank you for the report