]> git.ipfire.org Git - thirdparty/util-linux.git/commit
login: use getdtablesize() correctly in login.c
authorchas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Fri, 20 Apr 2012 14:58:28 +0000 (10:58 -0400)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Apr 2012 11:33:00 +0000 (13:33 +0200)
commit10610816191a7c8c75f184b5ba26861bd5b89d5d
treea97e5f994dfb80142aaf163860099e8a3d00eb4c
parent455fe9a075cc59e3250af9c413d42e7ac47a86a9
login: use getdtablesize() correctly in login.c

getdtablesize() is the number of descriptors and since decriptors start
at 0, its value isnt the largest descriptors possible.  One should use
getdtablesize() - 1 instead.

Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
login-utils/login.c