   Changelog for the c-ares project. Generated with git2changes.pl

Version 1.19.0 (18 Jan 2023)

bradh352 (18 Jan 2023)
- Prep for 1.19.0 release

- Fix inverted logic in 25523e2
  
  Fix .localhost. handling in prior commit
  
  Fix By: Brad House (@bradh352)

- RFC6761 localhost definition includes subdomains
  
  RFC6761 6.3 states:
    The domain "localhost." and any names falling within ".localhost."
  
  We were only honoring "localhost".
  
  Fixes: #477
  Fix By: Brad House (@bradh352)

- docs: ARES_OPT_UDP_PORT and ARES_OPT_TCP_PORT docs wrong byte order
  
  As per #487, documentation states the port should be in network byte
  order, but we can see from the test cases using MockServers on
  different ports that this is not the case, it is definitely in host
  byte order.
  
  Fix By: Brad House (@bradh352)

GitHub (18 Jan 2023)
- [hopper-vul brought this change]

  Add str len check in config_sortlist to avoid stack overflow (#497)
  
  In ares_set_sortlist, it calls config_sortlist(..., sortstr) to parse
  the input str and initialize a sortlist configuration.
  
  However, ares_set_sortlist has not any checks about the validity of the input str.
  It is very easy to create an arbitrary length stack overflow with the unchecked
  `memcpy(ipbuf, str, q-str);` and `memcpy(ipbufpfx, str, q-str);`
  statements in the config_sortlist call, which could potentially cause severe
  security impact in practical programs.
  
  This commit add necessary check for `ipbuf` and `ipbufpfx` which avoid the
  potential stack overflows.
  
  fixes #496
  
  Fix By: @hopper-vul

bradh352 (18 Jan 2023)
- Fix build due to str-split sed gone wrong
  
  Fix By: Brad House (@bradh352)

- cirrus-ci: switch to scan-build-py for MacOS
  
  MacOS seems to work better with scan-build-py
  
  Fix By: Brad House (@bradh352)

- ares_strsplit* -> ares__strsplit* to comply with internal function naming
  
  Inspired by #495, but was missing test cases and would failed to build.
  
  Fix By: Brad House (@bradh352), Daniel Stenberg (@bagder)

- Cirrus-CI: MacOS Homebrew has changed from /usr/local/opt to /opt/homebrew
  
  Fix paths for homebrew.
  
  Fix By: Brad House (@bradh352)

- cirrus-ci: iOS build needs to use ARM MacOS image
  
  CirrusCI removed Intel-based MacOS images.  Need to switch
  iOS builds to use new ARM images as well.
  
  Fix By: Brad House (@bradh352)

- cirrus-ci: new MacOS image
  
  Cirrus-CI has recently EOL'd Intel MacOS VMs, switch to the latest
  ARM-based image.
  
  Fix By: Brad House (@bradh352)

- acountry was passing stack variable to callback
  
  Recent ASAN versions picked up that acountry was passing stack
  variables to ares_gethostbyname() then leaving the stack context.
  We will now allocate a buffer for this.
  
  Fix By: Brad House (@bradh352)

GitHub (13 Dec 2022)
- [Daniel Stenberg brought this change]

  docs: reformat/cleanup man pages SYNOPSIS sections (#494)
  
  To make them render "nicer" in both terminals and on the website.
  
  - Removes the bold
  - Removes .PP lines
  - Indents them more like proper code style
  
  Fix By: Daniel Stenberg (@bagder)

- [Nikolaos Chatzikonstantinou brought this change]

  bug fix: new ares_strsplit (#492)
  
  * add ares_strsplit unit test
  
  The test reveals a bug in the implementation of ares_strsplit when the
  make_set parameter is set to 1, as distinct domains are confused for
  equal:
  
    out = ares_strsplit("example.com, example.co", ", ", 1, &n);
  
  evaluates to n = 1 with out = { "example.com" }.
  
  * bugfix and cleanup of ares_strsplit
  
  The purpose of ares_strsplit in c-ares is to split a comma-delimited
  string of unique (up to letter case) domains. However, because the
  terminating NUL byte was not checked in the substrings when comparing
  for uniqueness, the function would sometimes drop domains it should
  not. For example,
  
      ares_strsplit("example.com, example.co", ",")
  
  would only result in a single domain "example.com".
  
  Aside from this bugfix, the following cleanup is performed:
  
  1. The tokenization now happens with the help of strcspn instead of the
     custom function is_delim.
  2. The function list_contains has been inlined.
  3. The interface of ares_strsplit has been simplified by removing the
     parameter make_set since in practice it was always 1.
  4. There are fewer passes over the input string.
  5. We resize the table using realloc() down to its minimum size.
  6. The docstring of ares_strsplit is updated and also a couple typos
     are fixed.
  
  There occurs a single use of ares_strsplit and since the make_set
  parameter has been removed, the call in ares_init.c is modified
  accordingly. The unit test for ares_strsplit is also updated.
  
  Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount)

bradh352 (23 Oct 2022)
- CirrusCI: update freebsd image
  
  Old FreeBSD image for CirrusCI has issues with newer symbols, update to later one.
  
  Fix By: Brad House (@bradh352)

GitHub (23 Oct 2022)
- [Stephen Sachs brought this change]

  Fix Intel compiler deprecated options (#485)
  
  Options `-we ###` and `-wd ###` should not include a whitespace. They are also deprecated and `-diag-error` and `-diag-disable` are their replacements.
  
  Intel compiler 2021.6 is not able to be used in configure without the proposed patch.
  
  Fix By: Stephen Sachs (@stephenmsachs)

- [Jonathan Ringer brought this change]

  Allow for CMake to use absolute install paths (#486)
  
  Generated libcares.pc could have bad paths when using absolute paths.
  
  Fix By: Jonathan Ringer (@jonringer)

- [Thomas Dreibholz brought this change]

  Fix for issue #488: ensure that the number of iovec entries does not exceed system limits. (#489)
  
  c-ares could try to exceed maximum number of iovec entries supported by system.
  
  Fix By: Thomas Dreibholz (@dreibh)

- [bsergean brought this change]

  Add include guards to ares_data.h (#491)
  
  All the other header files in the src/lib folder do have an include guard so it look like an overthought.
  
  Fix By: @bsergean

- [Brad Spencer brought this change]

  Fix typo in docs for ares_process_fd (#490)
  
  A single letter was missing
  
  Fix By: Brad Spencer (@b-spencer)

- [lifenjoiner brought this change]

  tools: refine help (#481)
  
  fix invalid help options and documentation typos
  
  Fix By: @lifenjoiner

- [lifenjoiner brought this change]

  Git: ignore CMake temporary files (#480)
  
  exclude more files from git
  
  Fix By: @lifenjoiner

- [lifenjoiner brought this change]

  adig: fix `-T` option (#479)
  
  Helper was missing flag to enable TCP mode of operation.
  
  Fix By: @lifenjoiner

- [Frank brought this change]

  Add vcpkg installation instructions (#478)
  
  Update to include vcpkg installation instructions
  
  Fix By: @FrankXie05

- [marc-groundctl brought this change]

  Convert total timeout to per-query (#467)
  
  On Apple platforms, libresolv reports the total timeout in retrans, not the per-query time. This patch undoes that math to get the per-query time, which is what c-ares expects. This is not perfect because libresolv is inconsistent on whether the timeout is multiplied by retry or retry+1, but I don't see any way to distinguish these cases.
  
  Fix By: Marc Aldorasi (@marc-groundctl)

- [marc-groundctl brought this change]

  Don't include version info in the static library (#468)
  
  The static library should not contain version info, since it would be linked into an executable or dll with its own version info.
  
  Fix By: @marc-groundctl

- [Ridge Kennedy brought this change]

  Fix ares_getaddrinfo() numerical address fast path with AF_UNSPEC (#469)
  
  The conversion of numeric IPv4 addresses in fake_addrinfo() is broken when
  the family is AF_UNSPEC. The initial call to ares_inet_pton with AF_INET
  will succeed, but the subsequent call using AF_INET6 will fail. This results
  in the fake_addrinfo() fast path failing, and ares_getaddrinfo() making a
  query when none should be required.
  
  Resolve this by only attempting the call to ares_inet_pton with AF_INET6
  if the initial call with AF_INET was unsuccessful.
  
  Fix By: Ridge Kennedy (@ridgek)

- [Manish Mehra brought this change]

  Configurable hosts path for file_lookup (#465)
  
  This changeset adds support for configurable hosts file
  ARES_OPT_HOSTS_FILE (similar to ARES_OPT_RESOLVCONF).
  
  Co-authored-by: Manish Mehra (@mmehra)

bradh352 (27 Apr 2022)
- CMake: Windows DLLs lack version information
  
  The cares.rc was not included in the build for CMake.  Conditionally
  add it when building for Windows.
  
  Fix By: Brad House (@bradh352)
  Fixes Bug: #460

GitHub (27 Apr 2022)
- [Kai Pastor brought this change]

  CMake: Guard target creation in exported config (#464)
  
  User projects may call 'find_package(c-ares)' multiple times (e.g.
  via dependencies), but targets must be created only once.
  Shared and static target must be treated independently.
  
  Fix By: Kai Pastor (@dg0yt)

bradh352 (27 Apr 2022)
- Honor valid DNS result even if other class returned an error
  
  When using ares_getaddrinfo() with PF_UNSPEC, if a DNS server returned
  good data on an A record, followed by bad data on an AAAA record, the
  good record would be thrown away and an error returned.
  
  If we got a good response from one of the two queries, regardless of
  the order returned, we should honor that.
  
  Fix By: Dmitry Karpov (dkarpov@roku.com)
  Signed Off By: Brad House (@bradh352)

GitHub (2 Apr 2022)
- [Sam James brought this change]

  configure.ac: fix STDC_HEADERS typo (#459)
  
  There is no autoconf macro called STDC_HEADERS. AC_HEADER_STDC however does
  exist and it defines the STDC_HEADERS macro for use.
  
  Not clear that STDC_HEADERS from its use in the repo is needed but
  would rather not meddle with it for now.
  
  Fixes an annoying warning on `./configure`:
  ```
  /var/tmp/portage/net-dns/c-ares-1.18.1/work/c-ares-1.18.1/configure: 24546: STDC_HEADERS: not found
  ```
  
  Signed-off-by: Sam James <sam@gentoo.org>

bradh352 (2 Mar 2022)
- Asterisks should be allowed in host validation as CNAMEs may reference wildcard domains
  
  CloudFlare appears to use this logic in CNAMEs as per
  https://github.com/nodejs/node/issues/42171
  
  Fixes: #457
  Fix By: Brad House (@bradh352)

- Don't return on file lookup failure, set status
  
  When resolving a host via /etc/hosts, don't return with a predefined
  error as there may be other tries.
  
  Fix By: Brad House (@bradh352)

- 'localhost' special treatment enhancement
  
  Since localhost is special-cased, any errors should be ignored when
  reading /etc/hosts as otherwise we could return an error if there
  were for instance an invalidly formatted /etc/hosts or if /etc/hosts
  had a permissions error while reading.
  
  This exact behavior appears to have been seen on OS/400 PASE
  environments which allows AIX binares to run.
  
  Fix By: Brad House (@bradh352)

- If chain building c-ares as part of another project, detect of res_servicename could fail (#451)
  
  If libresolv is already included with the build, c-ares wouldn't properly detect its use.
  
  May fix: #451
  Fix by: Brad House (@bradh352)

- no analyze capability on ios

- attempt to use scan-build on ios

- disable tests on ios

- fix switch statement

- code coverage had gotten disabled

- looks like shell expansion doesn't work with cirrus-ci, lets do it another way

- attempt to autobuild for iOS

GitHub (8 Dec 2021)
- [Brad House brought this change]

  Windows: rework/simplify initialization code, drop long EOL systems (#445)
  
  There was a lot of windows initialization code specific to the era that predates Windows Vista such as reading DNS configuration from the registry, and dynamically loading libraries to get access to functions that didn't exist in XP or earlier releases.
  
  Vista was released in January 2007, and was EOL'd in 2017, and support for Vista is still maintained with this patch set.
  
  XP was EOL'd in Apr 8 2014.
  
  I believe the last OS based on something earlier than Vista was POSReady 2009, as it was XP based for some reason, and that was EOL'd in January 2019. Considering any POS system falls under the PCI-DSS rules, they aren't allow to run POSReady 2009 any more so there is no reason to try to continue supporting such systems.
  
  We have also targeted with our build system Vista support for the last few years, and while developers could change the target, we haven't had any reports that they have.

bradh352 (9 Nov 2021)
- Fix memory leak in reading /etc/hosts
  
  When an /etc/hosts lookup is performed, but fails with ENOTFOUND, and
  a valid RFC6761 Section 6.3 fallback is performed, it could overwrite
  variables that were already set and therefore leave the pointers
  dangling, never to be cleaned up.
  
  Clean up explicitly on ENOTFOUND when returning from the file parser.
  
  Fixes: #439
  Fix By: Brad House (@bradh352)

GitHub (2 Nov 2021)
- [Bobby Reynolds brought this change]

  Fix cross-compilation from Windows to Linux due to CPACK logic (#436)
  
  When determining value for CPACK_PACKAGE_ARCHITECTURE, prefer to use
  value from CMAKE_SYSTEM_PROCESSOR before falling back to uname output.
  
  Additionally, if building from a Windows host, emit a fatal error
  instead of attempting to call uname.
  
  Fix By: Bobby Reynolds (@reynoldsbd)

bradh352 (1 Nov 2021)
- fix coveralls link

- coveralls needs token

- coveralls appears to require git

- fix a couple of coveralls vars

- more coveralls fixes

- add code coverage libs to LDADD instead of _LIBS

- make verbose

- try to fix code coverage building

- need -y for install

- try to fix asan/ubsan/lsan when built with clang. try to support code coverage properly.

- try another path

- fix pip

- attempt to enable some other build types that travis supported

Version 1.18.1 (26 Oct 2021)

bradh352 (26 Oct 2021)
- missed version

- 1.18.1 release prep

- ares_getaddrinfo() was returning the wrong size for ai_addrlen
  
  ai_addrlen was erroneously returning 16 bytes instead of the
  sizeof(struct sockaddr_in6).  This is a regression introduced
  in 1.18.0.
  
  Reported by: James Brown <jbrown@easypost.com>
  Fix By: Brad House (@bradh352)

- Windows: autotools force linking to iphlpapi

GitHub (26 Oct 2021)
- [Gregor Jasny brought this change]

  Fix typo detected by lintian (#434)
  
  typo in docs for ares_parse_uri_reply
  
  Fix By: Gregor Jasny (@gjasny)

Version 1.18.0 (25 Oct 2021)

bradh352 (25 Oct 2021)
- replace Travis badge with Cirrus-CI badge

- c-ares 1.18.0 release prep

GitHub (21 Oct 2021)
- [Jérôme Duval brought this change]

  Haiku: port (#431)
  
  Port for Haiku.  Slight CMake changes, header changes, and resolv.conf/hosts paths specific to Haiku.
  
  Port By: Jérôme Duval (@korli)

bradh352 (19 Oct 2021)
- valgrind: fix reported invalid read

- make sure distcheck runs

- detect oddities and skip test if necessary

- fix null ptr deref in strlen

- bend over backwards for testing file access, something is weird on debian

- chmod(fn, 0) is failing on debian

- maybe process needs to be called

- split test output

- clean up a couple of compiler warnings

- use helper function for addrinfo to simplify code

- INSTANTIATE_TEST_CASE_P -> INSTANTIATE_TEST_SUITE_P as new convention in googletest

- gmock: update from 1.8.0 to 1.11.0

- Cirrus-CI: fix debian arm build

- Cirrus-CI: more updates for proper testing

- install proper packages for asan and analyze

- fix  crash in tests

- try to disable container tests

- need g++ for tests on debian

- try cirrus-ci again

- whitespace

- start bringing up cirrus-ci

- prep for adding new ci

- fix cut and paste error

GitHub (18 Oct 2021)
- [Brad House brought this change]

  RFC6761: special case "localhost" (#430)
  
  As per RFC6761 Section 6.3, "localhost" lookups need to be special cased to return loopback addresses, and not forward queries to recursive dns servers.
  
  We first look up via files (/etc/hosts or equivalent), and if that fails, we then attempt a system-specific address enumeration for loopback addresses (currently Windows-only), and finally fallback to ::1 and 127.0.0.1.
  
  Fix By: Brad House (@bradh352)
  Fixes Bug: #399

- [Brad House brought this change]

  Reimplement ares_gethostbyname() by wrapping ares_getaddrinfo() (#428)
  
  ares_gethostbyname() and ares_getaddrinfo() do a lot of similar things, however ares_getaddrinfo() has some desirable behaviors that should be imported into ares_gethostbyname(). For one, it sorts the address lists for the most likely to succeed based on the current system routes. Next, when AF_UNSPEC is specified, it properly handles search lists instead of first searching all of AF_INET6 then AF_INET, since ares_gethostbyname() searches in parallel. Therefore, this PR should also resolve the issues attempted in #94.
  
  A few things this PR does:
  
  1. ares_parse_a_reply() and ares_parse_aaaa_reply() had very similar code to translate struct ares_addrinfo into a struct hostent as well as into struct ares_addrttl/ares_addr6ttl this has been split out into helper functions of ares__addrinfo2hostent() and ares__addrinfo2addrttl() to prevent this duplicative code.
  
  2. ares_getaddrinfo() was apparently never honoring HOSTALIASES, and this was discovered once ares_gethostbyname() was turned into a wrapper, the affected test cases started failing.
  
  3. A slight API modification to save the query hostname into struct ares_addrinfo as the last element of name. Since this is the last element, and all user-level instances of struct ares_addrinfo are allocated internally by c-ares, this is not an ABI-breaking change nor would it impact any API compatibility. This was needed since struct hostent has an h_name element.
  
  4. Test Framework: MockServer tests via TCP would fail if more than 1 request was received at a time which is common when ares_getaddrinfo() queries for both A and AAAA records simultaneously. Infact, this was a long standing issue in which the ares_getaddrinfo() test were bypassing TCP alltogether. This has been corrected, the message is now processed in a loop.
  
  5. Some tests had to be updated for overall correctness as they were invalid but somehow passing prior to this change.
  
  Change By: Brad House (@bradh352)

bradh352 (9 Oct 2021)
- ares_getaddrinfo() missing sanity check to fix #426

- ares_getaddrinfo(): continue to next domain in search if query returns ARES_ENODATA
  
  Some DNS servers may behave badly and return a valid response with no data, in this
  case, continue on to the next search domain, but cache the result.
  
  Fixes Bug: #426
  Fix By: Brad House (@bradh352)

- Allow '/' as a valid character for a returned name
  
  As of c-ares 1.17.2, a CNAME an in-addr.arpa delegation broke due
  to not allowing '/'.  This needs to be allowed to not break valid
  functionality.
  
  Fixes Bug: #427
  Reported By: Adrian (@leftshift)
  Fix By: Brad House (@bradh352)

Daniel Stenberg (5 Oct 2021)
- libcares.pc.in: update the URL

bradh352 (8 Sep 2021)
- ares_expand_name should allow underscores (_) as SRV records legitimately use them
  
  c-ares 1.17.2 introduced response validation to prevent a security issue, however
  it did not have (_) listed as a valid character for domain name responses which
  caused issues when a CNAME referenced a SRV record which contained underscores.
  
  While RFC2181 section 11 does explicitly state not to do validation, that applies
  to servers not clients.
  
  Fixes: #424
  Fix By: Brad House (@bradh352)

Daniel Stenberg (7 Sep 2021)
- domain: update to use c-ares.org
  
  Closes #423

- mailing list: moved to lists.haxx.se

GitHub (3 Sep 2021)
- [Biswapriyo Nath brought this change]

  CMake: Fix build in cygwin (#422)
  
  As cygwin environment has both socket.h and winsock2.h headers check WIN32 not to include the later one here
  
  Fix By: Biswapriyo Nath (@Biswa96)

bradh352 (23 Aug 2021)
- make building more verbose

- add appveyor cmake/mingw static-only build

GitHub (17 Aug 2021)
- [Sinan Kaya brought this change]

  CMake: lower case advapi32 for cross-building with mingw (#420)
  
  When cross compiling with yocto's meta-mingw layer, getting a dependency
  error.
  
  This is caused by the fact that advapi32 is lower case in mingw builds.
  
  Fix By: Sinan Kaya <sinan.kaya@microsoft.com>

bradh352 (17 Aug 2021)
- autotools: add ax_check_gnu_make.m4

- autotools: add ax_require_defined.m4

- autotools: dont use newer AC_CHECK_INCLUDES_DEFAULT, don't quote AC_ERROR_MSG

- import more files needed by newer ax_code_coverage.m4

- import more files needed by newer ax_code_coverage.m4

- work around autoreconf -fiv first call returning 'error: too many loops'

- restore zz40-xc-ovr.m4

- autotools: processed configure.ac through autoupdate

- autotools. update ax_code_coverage.m4 to latest. don't use deprecated AC_HELP_STRING

- pull out some old autotools cruft

GitHub (17 Aug 2021)
- [Felix Yan brought this change]

  Provide ares_nameser.h as a public interface (#417)
  
  NodeJS needs ares_nameser.h as a pubic header.
  
  Fixes: #415
  Fix By: Felix Yan (@felixonmars)

- [Felix Yan brought this change]

  Fix building when latest ax_code_coverage.m4 is imported (#418)
  
  ax_code_coverage.m4 dropped the @CODE_COVERAGE_RULES@ macro, so we need to switch to the latest recommendation from the m4 file.  This requires updates to Makefile.am.
  
  Fix By: Felix Yan (@felixonmars)

bradh352 (12 Aug 2021)
- bump version to match current release

GitHub (12 Aug 2021)
- [dhrumilrana brought this change]

  z/OS minor update, add missing semicolon in ares_init.c (#414)
  
  Build fix for z/OS
  
  Fix by: Dhrumil Rana (@dhrumilrana)

- [Daniel Bevenius brought this change]

  add build to .gitignore (#410)
  
  This commit adds the build directory to be ignored by git.
  
  The motivation for adding this to .gitignore as opposed to
  .git/info/exclude is that the CMake example in INSTALL.md uses build
  as the name of the directory to be used by CMake. This will cause
  git to report build as an untracked file.
  
  Fix By: Daniel Bevenius (@danbev)

- [Martin Holeš brought this change]

  Add support for URI(Uniform Resource Identifier) records. (#411)
  
  Add ares_parse_uri_reply() for parsing URI DNS replies.
  
  Fix By: Martin Holeš (@martin-256)

Daniel Stenberg (10 Aug 2021)
- ares_getaddrinfo.3: available since 1.16.0

- README.md: use https:// links

Version 1.17.2 (24 Jul 2021)

bradh352 (24 Jul 2021)
- fix typo

- prep for 1.17.2 release

GitHub (30 Jun 2021)
- [jeanpierrecartal brought this change]

  Replace strdup() with ares_strdup() (#408)
  
  strdup() is used in src/lib/ares_parse_a_reply.c and src/lib/ares_parse_aaaa_reply.c whereas allocated memory is freed using ares_free().
  
  Bug: 407
  Fix By: Jean-pierre Cartal (@jeanpierrecartal)

- [Brad House brought this change]

  Validate hostnames in DNS responses and discard from malicious servers (#406)
  
  To prevent possible users having XSS issues due to intentionally malformed DNS replies, validate hostnames returned in responses and return EBADRESP if they are not valid.
  
  It is not clear what legitimate issues this may cause at this point.
  
  Bug Reported By: philipp.jeitner@sit.fraunhofer.de
  Fix By: Brad House (@bradh352)

bradh352 (11 Jun 2021)
- ares_expand_name(): fix formatting and handling of root name response
  
  Fixes issue introduced in prior commit with formatting and handling
  of parsing a root name response which should not be escaped.
  
  Fix By: Brad House

- ares_expand_name() should escape more characters
  
  RFC1035 5.1 specifies some reserved characters and escaping sequences
  that are allowed to be specified.  Expand the list of reserved characters
  and also escape non-printable characters using the \DDD format as
  specified in the RFC.
  
  Bug Reported By: philipp.jeitner@sit.fraunhofer.de
  Fix By: Brad House (@bradh352)

GitHub (15 Apr 2021)
- [HALX99 brought this change]

  Fix can't get dns server on macos and ios (#401)
  
  If DNS configuration didn't include search domains on MacOS (or iOS) it would throw an error instead of ignoring.
  
  Fix By: @halx99

- [catalinh-bd brought this change]

  Bugfix/crash in ares  sortaddrinfo (#400)
  
  The bug was generated because there was no check for the number
  of items in the list and invalid memory was accesed when the list
  was empty. There is a check for null after calling malloc but on
  some systems it always returns a valid address for size equals 0.
  Relates To: #392, 0903dcecabca283d0fa771632892dc7592b7a66d
  
  Fix By: @catalinh-bd

bradh352 (2 Mar 2021)
- Null deref if ares_getaddrinfo() is terminated with ares_destroy()
  
  ares_freeaddrinfo() was not checking for a Null ptr during cleanup of
  an aborted query.
  
  Once that was resolved it uncovered another possible issue with
  multiple simultaneous underlying queries being outstanding and
  possibly prematurely cleaning up the handle.
  
  Reported By: Michael Kourlas
  Fix By: Brad House (@bradh352)

GitHub (18 Feb 2021)
- [Brad House brought this change]

  CMake: RANDOM_FILE not defined #397
  
  RANDOM_FILE was never defined by cmake, causing RC4 key generation to use the less secure rand() method.
  
  Also, due to clashes with chain-building from other projects (e.g. curl) that may define RANDOM_FILE, this was renamed to CARES_RANDOM_FILE.
  
  This is the proposed change for #396
  
  Fix By: Brad House (@bradh352)

- [Anton Danielsson brought this change]

  CMake: fix Make install for iOS/MacOS (#395)
  
  INSTALL TARGETS were missing the BUNDLE DESTINATION
  
  Fix By: Anton Danielsson (@anton-danielsson)

- [František Dvořák brought this change]

  Fix build with autotools out of source tree (#394)
  
  Add missing include directory, which fixes the build with autotools in separated build directory.
  
  Fix By: František Dvořák (@valtri)

bradh352 (15 Jan 2021)
- fuzzing: HAVE_CONFIG_H may not be defined so cannot include ares_setup.h.  Its not needed even though we include ares_nameser.h

- remove redundant header checks

- properly detect netinet/tcp.h on openbsd

- more portability updates

- renamed nameser.h to ares_nameser.h requires Makefile.inc update for distributed files

- more portability updates

- remove bad files

- portability updates for test cases

- Portability Updates for arpa/nameser.h (#388)
  
  There is too much inconsistency between platforms for arpa/nameser.h and arpa/nameser_compat.h for the way the current files are structured.  Still load the respective system files but make our private nameser.h more forgiving.
  
  Fixes: #388
  Fix By: Brad House (@bradh352)

- ares_parse_ptr_reply() handle NULL for addr/addr_len. Fixes #392
  
  NodeJS passes NULL for addr and 0 for addrlen parameters to ares_parse_ptr_reply().  On systems where malloc(0) returned NULL, this would cause the function to return ARES_ENOMEM, but the cleanup wasn't handled properly and would crash.
  
  This patche fixes that bug, and also hardens ares_free_hostent() to not leak memory during cleanup.
  
  Fixes: #392
  Fix By: Brad House (@bradh352)

- Define behavior of malloc(0)
  
  Some systems may return either NULL or a valid pointer on malloc(0).  c-ares should never call malloc(0) so lets return NULL so we're more likely to find an issue if it were to occur.

GitHub (24 Dec 2020)
- [dhrumilrana brought this change]

  z/OS: port (#390)
  
  Port c-ares to z/OS.
  
  Fix By: Dhrumil Rana (@dhrumilrana)

- [vburdo brought this change]

  Use unbuffered stdio for /dev/urandom to read only requested data (#391)
  
  Buffered fread() reads 4096 bytes which is completely unnecessary and potentially may cause problems.
  I discovered this on private linux configuration where custom /dev/urandom implementation has poor performance.
  
  Fix By: @vburdo

- [Jay Freeman (saurik) brought this change]

  This relative header #include needs to use quotes. (#386)
  
  Fix By: Jay Freeman (@saurik)

bradh352 (23 Nov 2020)
- Win32: Fix tools build with autotools static library
  When c-ares is being built as static on Win32, CARES_STATICLIB must
  be defined, but it wasn't being pulled in for the tools.
  
  Fixes: #384
  Fix By: Brad House (@bradh352)

- Loosen requirements for static c-ares library when building tests
  
  It appears that when building tests, it would hardcode enabling building
  of the c-ares static library.  This was probably due to Windows limitations
  in symbol visibility.
  
  This change will use the static library if it exists for tests, always.
  Otherwise, it will only forcibly enable static libraries for tests on
  Windows.
  
  Fixes: #380
  Fix By: Brad House (@bradh352)

- Remove legacy comment about ahost/acountry/adig targets

- Distribute fuzzinput/fuzznames for fuzz tests
  
  The fuzz test files were not being distributed.  This doesn't appear to be
  a regression, it looks like they have never been distributed.
  
  Fixes: #379
  Fix By: Brad House (@bradh352)

Version 1.17.1 (19 Nov 2020)

GitHub (19 Nov 2020)
- [Brad House brought this change]

  Travis: add iOS target built with CMake (#378)
  
  Issue #377 suggested that CMake builds for iOS with c-ares were broken. This PR adds an automatic Travis build for iOS CMake.
  
  Fix By: Brad House (@bradh352)

bradh352 (18 Nov 2020)
- fix build

GitHub (18 Nov 2020)
- [Fabrice Fontaine brought this change]

  External projects were using non-public header ares_dns.h, make public again (#376)
  
  It appears some outside projects were relying on macros in ares_dns.h, even though it doesn't appear that header was ever meant to be public.  That said, we don't want to break external integrators so we should distribute this header again.
  
  Fix By: Fabrice Fontaine (@ffontaine)

bradh352 (17 Nov 2020)
- note that so versioning has moved to configure.ac

- note about 1.17.1

- fix sed gone wrong

GitHub (17 Nov 2020)
- [Daniel Stenberg brought this change]

  autotools cleanup (#372)
  
  * remove: install-sh mkinstalldirs
  
  They're generated when needed, no need to store in it.
  
  * buildconf: remove custom logic with autoreconf
  
  Fix By: Daniel Stenberg (@bagder)

bradh352 (17 Nov 2020)
- attempt to fix 1.17.0 release distribution issues

Version 1.17.0 (16 Nov 2020)

bradh352 (16 Nov 2020)
- 1.17.0 release prep

- ares_getaddrinfo(): duplicate hints ai_socktype and ai_protocol into output
  
  ai_socktype and ai_protocol were ignored from the hints input.  They are now
  duplicated into the output as expected.  Currently no sanity checks on
  proper values are taking place.
  
  Fixes: #317
  Fix By: Brad House (@bradh352)

- ares_parse_{a,aaaa}_reply could return larger *naddrttls than passed in
  
  If there are more ttls returned than the maximum provided by the requestor, then
  the *naddrttls response would be larger than the actual number of elements in
  the addrttls array.
  
  This bug could lead to invalid memory accesses in applications using c-ares.
  
  This behavior appeared to break with PR #257
  
  Fixes: #371
  Reported By: Momtchil Momtchev (@mmomtchev)
  Fix By: Brad House (@bradh352)

GitHub (5 Nov 2020)
- [Dustin Lundquist brought this change]

  docs: ares_set_local_ip4() uses host byte order (#368)
  
  Properly document brain-dead behavior of ares_set_local_ip4() using host byte order instead of expected network byte order.
  
  Fix By: Dustin Lundquist <d.lundquist@tempered.io>

- [Łukasz Marszał brought this change]

