[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Can lua_next() error?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 16 Apr 2018 13:12:50 -0300
> `lua_next` may raise error when you pass a key that is not exist in the table.
> Good point, but that would qualify it for a "v" ("the function may raise an error on purpose") rather than an "e" ("the function may raise any errors (it can run arbitrary Lua code, either directly or through metamethods)" wouldn't it?
I have to recognize that the distinction between "e" and "v" here is not
very clear. By that comment, that "it can run arbitrary Lua code, either
directly or through metamethods", you are right that this one should
have a "v".
> Is there any way in which a call to lua_next() (with a valid table index and a valid key on the stack) could result in arbitrary code being run?