I'm running c-ares version 1.7.4
I came across a segfault on Windows in ares_gethostbyname.c in "file_lookup"
The basic problem seems to be that PATH_HOSTS isn't initialized. If the
call to "RegOpenKeyEx" fails, PATH_HOSTS makes it down to "strcat" before
being initialized. If there are no null characters in the first MAX_PATH
characters, strcat copies off the end of the array and things end up
corrupted.
The valid fix is to clear PATH_HOSTS. ares_gethostbyaddr contains the same
code, so I fixed it there as well.
I've attached a very simple patch including the changes.
Thanks,
--Jeremy