lua-users home
lua-l archive

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


The latest commit 9b4f39ab14fb2e55345c3d23537d129dac23b091 introduces undefined behaviour in internshrstr when LUAI_ASSERT is defined. The problem lies in this line of code:

memcpy(getshrstr(ts), str, l * sizeof(char));

Because shrlen is not initialised, it is possible that its value is 0xFF, tripping the assert. This can be fixed by initialising this field in createstrobj or moving the line that initialises it above the memcpy.