[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: checking userdata type from lua
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 18 May 2006 10:23:36 -0300
> > That's dangerous. If you expose the registry, you can turn a udata from
> > one type to another. So you could convert a button to a file and then
> > call close on it, which will probably crash the host app.
>
> isn't this already possible with setmetatable() ?
No, try it! From Lua you can only set the metatables of tables, not of
udata, precisely to avoid crashing the host app from Lua.
Lua is secure, unless *you* make it insecure...
--lhf