fixed a memory corruption bug in ads_try_dns()