<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">When this thread began, I initially assumed that the system header file <sys/select.h> would implement FD_SET (etc.) by either checking itself whether the socket number was in the range [0,FD_SETSIZE), or else by ensuring that it would use a bitmap large enough for all possible socket numbers (regardless of FD_SETSIZE).<div class=""><br class=""></div><div class="">To my astonishment, when I looked at the implementation (in the system header file <sys/select.h>), in every implementation I looked at, the bitmap was only large enough for FD_SETSIZE, and there was no checking against this - so buffer overflow occurs if you use a socket number >= FD_SETSIZE!</div><div class=""><br class=""></div><div class="">This is (IMHO) a serious bug in the <sys/select.h> system header file (in most, if not all, Unix systems out there). So I’ve changed my mind yet again and decided to adopt Michel Promonet’s suggestion of testing for this myself in our implementation of “BasicUsageEnvironment::setBackgroundHandling()” and “BasicUsageEnvironment::moveBackgroundHandling()”.</div><div class=""><br class=""></div><div class="">A new version (2014.12.11) of the “LIVE555 Streaming Media” code has now been installed.</div><div class=""><div class=""><br class=""><div apple-content-edited="true" class="">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;">Ross Finlayson<br class="">Live Networks, Inc.<br class=""><a href="http://www.live555.com/" class="">http://www.live555.com/</a></span>
</div>
<br class=""></div></div></body></html>