|
I updated lua source from https://github.com/lua/lua today, and my
project crashed.
I found the TString is not initialized before getshrstr().
https://github.com/lua/lua/blob/master/lstring.c#L209-L211
I think it should be :
ts = createstrobj(L, l, LUA_VSHRSTR, h);
ts->shrlen = cast_byte(l);
memcpy(getshrstr(ts), str, l * sizeof(char));
The `ts->shrlen` should be initialized before memcpy().