diff -Naur -x '*.orig' -x '*.rej' nss-pam-ldapd-0.8.6/common/tio.c nss-pam-ldapd-0.8.6-cve-2013-0288/common/tio.c --- nss-pam-ldapd-0.8.6/common/tio.c 2011-03-31 22:17:33.000000000 +0200 +++ nss-pam-ldapd-0.8.6-cve-2013-0288/common/tio.c 2013-02-23 13:32:35.676954461 +0100 @@ -183,6 +183,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 */ @@ -395,6 +400,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 */