summaryrefslogtreecommitdiffstats
path: root/sbin/ping6
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2002-09-09 16:06:41 +0000
committernectar <nectar@FreeBSD.org>2002-09-09 16:06:41 +0000
commitdd9ba6e842206d91cae719d204523f24c60615ec (patch)
tree3a58cc85900475dff849cc5b4e8d64b9d7906c36 /sbin/ping6
parent4f70a78fd0c407f315a8e2149bca046379d79a1f (diff)
downloadFreeBSD-src-dd9ba6e842206d91cae719d204523f24c60615ec.zip
FreeBSD-src-dd9ba6e842206d91cae719d204523f24c60615ec.tar.gz
Check for FD_SET overrun.
Diffstat (limited to 'sbin/ping6')
-rw-r--r--sbin/ping6/ping6.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c
index d9f49b9..24176f0 100644
--- a/sbin/ping6/ping6.c
+++ b/sbin/ping6/ping6.c
@@ -1029,6 +1029,8 @@ main(argc, argv)
tv = &timeout;
} else
tv = NULL;
+ if (s >= FD_SETSIZE)
+ errx(1, "descriptor too big");
memset(fdmaskp, 0, fdmasks);
FD_SET(s, fdmaskp);
cc = select(s + 1, fdmaskp, NULL, NULL, tv);
OpenPOWER on IntegriCloud