[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Small inconsistency?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 19 Mar 2007 14:00:25 -0300
> Here's what appears to be an inconsistency in the Lua sources.
Not really an inconsistency, I think. Perhaps the code is not as defensive
as you wish. If you change LUA_SIGNATURE or the things that go into the
header, you must set LUAC_HEADERSIZE accordingly.
A simple (untested) fix, which won't catch all abuse is to modify luaU_header
as follows:
void luaU_header (char* h)
{
int x=1;
char *H=h; <<<< new
...
lua_assert((h-H)==LUAC_HEADERSIZE); <<<< new
}
--lhf