lua-users home
lua-l archive

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

On 21 February 2012 20:39, Sam Roberts <> wrote:

> Also, its true, luasocket isn't bounds checking it's calls to
> FD_SET(). Its a bug that occurs in two places, and seemingly easy to
> fix, except fixing it exposed another bug (error return values
> incorrectly converted to strings), and a documentation/interface
> question...
> Currently, ignores socket descriptors that are closed
> or invalid (useful, intended, and documented).
> However, silently ignoring socket descriptors >= FD_SETSIZE seems like
> a landmine in the kitchen, so I could make it return an error (but no
> error return is currently documented, though there is one), or I could
> make it die with a lua error. I'm tempted to do the latter. Its an
> interface change, but it really isn't valid to pass descriptors larger
> than FD_SETSIZE to, failing hard and fast seems
> appropriate.
> Anybody have opinions on this?

I believe Diego fixed this already - see the code in

Yet another sign we need to merge and make a new release :)