File bnc#804682.dif of Package nss-pam-ldapd.1442
diff -ru nss-pam-ldapd-0.8.10/common/tio.c nss-pam-ldapd-0.8.10-fixed/common/tio.c
--- nss-pam-ldapd-0.8.10/common/tio.c 2012-04-26 21:50:43.000000000 +0200
+++ nss-pam-ldapd-0.8.10-fixed/common/tio.c 2013-03-13 14:57:13.000000000 +0100
@@ -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 */