<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br><br></div><div>nfds = ares_fds(channel, &read_fds, &write_fds);<br></div><div><br></div><div>I don't understand how this is a buffer overflow as the function call only uses locally initialised variables. Here is the full function:</div><div><br></div><div>static void wait_ar</div><br><div>    struct timevaes(ares_channel channel)<br>{l *tvp, tv;<br>    fd_set read_fds, write_fds;<br>    int nfds;<br><br>    FD_ZERO(&read_fds);<br>    FD_ZERO(&write_fds);<br>    nfds = ares_fds(channel, &read_fds, &write_fds);<br><br>    if (nfds > 0) {<br>    tvp = ares_timeout(channel, NULL, &tv);<br>    select(nfds, &read_fds, &write_fds, NULL, tvp);<br>    ares_process(channel, &read_fds, &write_fds);<br>    }<br>}</div></div></blockquote><div><br></div><div><br></div><div> fd >= FD_SETSIZE is undefined behaviour., glibc is being nice to you, it could as well shatter the universe into pieces.</div><div> </div></div></div>