> > nfds = ares_fds(channel, &read_fds, &write_fds); > > I don't understand how this is a buffer overflow as the function call only > uses locally initialised variables. Here is the full function: > > static void wait_ar > > struct timevaes(ares_channel channel) > {l *tvp, tv; > fd_set read_fds, write_fds; > int nfds; > > FD_ZERO(&read_fds); > FD_ZERO(&write_fds); > nfds = ares_fds(channel, &read_fds, &write_fds); > > if (nfds > 0) { > tvp = ares_timeout(channel, NULL, &tv); > select(nfds, &read_fds, &write_fds, NULL, tvp); > ares_process(channel, &read_fds, &write_fds); > } > } >
fd >= FD_SETSIZE is undefined behaviour., glibc is being nice to you, it could as well shatter the universe into pieces.
-- c-ares mailing list c-ares@lists.haxx.se https://lists.haxx.se/listinfo/c-ares