mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Use checked_fd_set in 2 more places: bounce scan and pcap_select
This commit is contained in:
@@ -937,7 +937,7 @@ int pcap_select(pcap_t *p, struct timeval *timeout) {
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
FD_ZERO(&rfds);
|
FD_ZERO(&rfds);
|
||||||
FD_SET(fd, &rfds);
|
checked_fd_set(fd, &rfds);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|||||||
2
tcpip.cc
2
tcpip.cc
@@ -1758,7 +1758,7 @@ int recvtime(int sd, char *buf, int len, int seconds, int *timedout) {
|
|||||||
timeout.tv_sec = seconds;
|
timeout.tv_sec = seconds;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
FD_ZERO(&readfd);
|
FD_ZERO(&readfd);
|
||||||
FD_SET(sd, &readfd);
|
checked_fd_set(sd, &readfd);
|
||||||
if (timedout)
|
if (timedout)
|
||||||
*timedout = 0;
|
*timedout = 0;
|
||||||
res = select(sd + 1, &readfd, NULL, NULL, &timeout);
|
res = select(sd + 1, &readfd, NULL, NULL, &timeout);
|
||||||
|
|||||||
Reference in New Issue
Block a user