lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Jan 25, 2019 at 1:42 AM Luiz Henrique de Figueiredo wrote:
> The crash could be reproduced on any Luac version.
> For example, to create such bytecode for little-endian Luac 5.3, it is enough to replace the "return" instruction with reserved opcode=63

Ok, the problem is the following line in PrintCode, which only works
if o < NUM_OPCODES :

printf("%-9s\t",luaP_opnames[o]);




Yes, that's array index out of bounds error.
Could you please fix it in Luac?
(for example, to display opcode when opname doesn't exist)