Fix heap corruption on Windows exposed by the use-after free fix.
authorTodd C. Miller <Todd.Miller@sudo.ws>
Wed, 21 Feb 2018 03:18:38 +0000 (20:18 -0700)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Wed, 21 Feb 2018 03:18:38 +0000 (20:18 -0700)
commit89102b02047d0220766f55ec041c8fc46234cf69
tree75c9ff6e14c807906e39e4ab7e6c51bb6f0eac6e
parent8f73169567fed6703acbad4f0f5fd5cff700d619
Fix heap corruption on Windows exposed by the use-after free fix.
reset_address_cache() could call free_known_addresses() on a struct
addrinfo * that was returned by getaddrinfo().  It seems safest to just
make a copy of the addresses returned by getaddrinfo() so we can always
use free_known_addresses() instead of trying to determine whether or
not we need to use freeaddrinfo().
src/address_cache.c