php-src/ext/sockets
Wez Furlong 99e290f882 Fix for Bug #24189: possibly unsafe select(2) usage.
We avoid the problem by using poll(2).

On systems without poll(2) (older bsd-ish systems, and win32), we emulate
poll(2) using select(2) and check for valid descriptors before attempting
to access them via the descriptor sets.

If an out-of-range descriptor is detected, an E_WARNING is raised suggesting
that PHP should be recompiled with a larger FD_SETSIZE (and also with a
suggested value).

Most uses of select(2) in the source are to poll a single descriptor, so
a couple of handy wrapper functions have been added to make this easier.

A configure option --enable-fd-setsize has been added to both the unix and
win32 builds; on unix we default to 16384 and on windows we default to 256.
Windows FD_SETSIZE imposes a limit on the maximum number of descriptors that
can be select()ed at once, whereas the unix FD_SETSIZE limit is based on the
highest numbered descriptor; 256 should be plenty for PHP scripts under windows
(the default OS setting is 64).

The win32 specific parts are untested; will do that now.
2004-09-17 12:44:56 +00:00
..
tests Fixed bugs in various tests. 2003-08-12 00:44:05 +00:00
config.m4 Make php_set_inet6_addr happy with any environment. Use getaddrinfo() if available, gethostbyname2() if not, and simply fail if neither is present. 2003-07-08 03:38:00 +00:00
config.w32 Make these build with new win32 build system. 2003-12-19 17:00:14 +00:00
CREDITS Add myself as a maintainer 2001-12-14 05:58:28 +00:00
package.xml more visa to sibira ;) 2004-03-24 18:43:23 +00:00
php_sockets_win.c - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
php_sockets_win.h - Happy new year and PHP 5 for rest of the files too.. 2004-01-08 17:33:29 +00:00
php_sockets.h - Happy new year and PHP 5 for rest of the files too.. 2004-01-08 17:33:29 +00:00
sockets.c Fix for Bug #24189: possibly unsafe select(2) usage. 2004-09-17 12:44:56 +00:00
sockets.dsp - Renamed all *php4* files to *php5*, changed all php4/PHP4 to php5/PHP5 2004-01-17 13:00:38 +00:00
sockets.php * Makefile.in 2000-07-03 04:35:57 +00:00
unix_socket_constants.h - Happy new year and PHP 5 for rest of the files too.. 2004-01-08 17:33:29 +00:00
win32_socket_constants.h - Happy new year and PHP 5 for rest of the files too.. 2004-01-08 17:33:29 +00:00