Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ares_set_servers_csv() on failure should not leave channel in a bad s…
…tate If bad data is passed to ares_set_servers_csv() or ares_set_servers_ports_csv() it will clear the existing channel configured DNS servers, then a call to ares_send() will fail due to a bad malloc which may have undefined behavior. The fix now only clears existing servers on success. An additional sanity check was added in ares_send() to ensure nservers >= 1 or will result in ARES_ESERVFAIL. Bug: https://c-ares.haxx.se/mail/c-ares-archive-2018-03/0000.shtml Reported-by: Francisco Sedano Crippa
- Loading branch information