nss-pam-ldapd commit: r1781 - nss-pam-ldapd/common
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1781 - nss-pam-ldapd/common
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1781 - nss-pam-ldapd/common
- Date: Fri, 12 Oct 2012 17:25:26 +0200 (CEST)
Author: arthur
Date: Fri Oct 12 17:25:26 2012
New Revision: 1781
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1781&view=revision
Log:
check if the file descriptor can be stored in the select() file descriptor set
Modified:
nss-pam-ldapd/common/tio.c
Modified: nss-pam-ldapd/common/tio.c
==============================================================================
--- nss-pam-ldapd/common/tio.c Fri Oct 12 17:11:28 2012 (r1780)
+++ nss-pam-ldapd/common/tio.c Fri Oct 12 17:25:26 2012 (r1781)
@@ -184,6 +184,11 @@
while (1)
{
/* prepare our filedescriptorset */
+ if (fp->fd>=FD_SETSIZE)
+ {
+ errno=EBADFD;
+ return -1;
+ }
FD_ZERO(&fdset);
FD_SET(fp->fd,&fdset);
/* figure out the time we need to wait */
@@ -343,6 +348,11 @@
while (1)
{
/* prepare our file descriptor set */
+ if (fp->fd>=FD_SETSIZE)
+ {
+ errno=EBADFD;
+ return -1;
+ }
FD_ZERO(&fdset);
FD_SET(fp->fd,&fdset);
/* prepare the time to wait */
@@ -446,6 +456,11 @@
fd_set fdset;
int rv;
/* prepare our filedescriptorset */
+ if (fp->fd>=FD_SETSIZE)
+ {
+ errno=EBADFD;
+ return -1;
+ }
FD_ZERO(&fdset);
FD_SET(fp->fd,&fdset);
/* set the timeout to 0 to poll */
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd commit: r1781 - nss-pam-ldapd/common,
Commits of the nss-pam-ldapd project