diff options
author | nectar <nectar@FreeBSD.org> | 2002-09-09 16:06:41 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-09-09 16:06:41 +0000 |
commit | dd9ba6e842206d91cae719d204523f24c60615ec (patch) | |
tree | 3a58cc85900475dff849cc5b4e8d64b9d7906c36 /sbin/ping6 | |
parent | 4f70a78fd0c407f315a8e2149bca046379d79a1f (diff) | |
download | FreeBSD-src-dd9ba6e842206d91cae719d204523f24c60615ec.zip FreeBSD-src-dd9ba6e842206d91cae719d204523f24c60615ec.tar.gz |
Check for FD_SET overrun.
Diffstat (limited to 'sbin/ping6')
-rw-r--r-- | sbin/ping6/ping6.c | 2 |
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); |