Article View: news.software.nntp
Article #84114Re: Rebuilding overview
From: Julien ÉLIE
Date: Sat, 11 Jun 2011 09:03
Date: Sat, 11 Jun 2011 09:03
39 lines
2466 bytes
2466 bytes
Hi all,
> Well, I bet I should then use (FD_SETSIZE-1) instead of FD_SETSIZE when
> setting the upper value so as not to cause problem here.
I think this discussion on inn-workers answers the question:
https://lists.isc.org/mailman/htdig/inn-workers/2000-April/002336.html
"innd is a heavy user of select(), and Bad Things will happen if you try
to use fds > 1023 with select() pre Solaris 7...
Yeah, if I recall correctly, the FD_*() macros will happily scribble all
over memory if you try to initialize an fd_set that's larger than 1024."
I understand for innd.
But something still puzzles me. What for backends/innxmit.c where we have:
fd_set rmask;
FromServer = fileno(From);
FD_ZERO(&rmask);
FD_SET(FromServer, &rmask);
i = select(FromServer + 1, &rmask, NULL, NULL, &t);
Don't we have a problem if we do not check the value of FromServer with
FD_SETSIZE?
Same thing in a few other programs. For instance authprogs/radius.c:
sock = socket(AF_INET, SOCK_DGRAM, 0)
got = select(sock+1, &rdfds, 0, 0, &tmout);
--
Julien ÉLIE
« Un voyage de mille lieues commence toujours par un premier pas. »
(Lao Zi)
Technical Details
Message-ID:
<95gpauF4aiU1@mid.individual.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.addix.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<slrnis7i5f.bet.steve@news.mixmin.net> <iq1e3h$59m$1@news.trigofacile.com> <slrnit9m74.23b.steve@news.mixmin.net> <95gob9Fsl1U1@mid.individual.net>Show Full Headers
Complete Article Headers
Message-ID: <95gpauF4aiU1@mid.individual.net> Subject: Re: Rebuilding overview Date: Sat, 11 Jun 2011 11:03:26 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <slrnis7i5f.bet.steve@news.mixmin.net> <iq1e3h$59m$1@news.trigofacile.com> <slrnit9m74.23b.steve@news.mixmin.net> <95gob9Fsl1U1@mid.individual.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.addix.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 39 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net yaTrhxjlU8PZi8dfDQLsNQveFQyO3SMrg4/WOTAB1Leu5xfCM= Cancel-Lock: sha1:7DheE6qy2RxATdWUF0E24MNy8Z0= User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr; In-Reply-To: <95gob9Fsl1U1@mid.individual.net> X-Original-Bytes: 2296