summaryrefslogtreecommitdiff
path: root/ares_parse_txt_reply.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-11-26 01:21:21 (GMT)
committerYang Tse <yangsita@gmail.com>2009-11-26 01:21:21 (GMT)
commit57e48c4cf1d8f125eaa11e184c7f35f7d6ce9fd3 (patch)
tree7759f59916026d4471f01de7f8ce1dac1a4a01fc /ares_parse_txt_reply.c
parent4bc98ca85c13378cf9d53cf7516c4c9cfa0d03e1 (diff)
downloadc-ares-57e48c4cf1d8f125eaa11e184c7f35f7d6ce9fd3.zip
c-ares-57e48c4cf1d8f125eaa11e184c7f35f7d6ce9fd3.tar.gz
c-ares-57e48c4cf1d8f125eaa11e184c7f35f7d6ce9fd3.tar.bz2
- Larry Lansing fixed ares_parse_srv_reply to properly parse replies
which might contain non-SRV answers, skipping over potential non-SRV ones such as CNAMEs.
Diffstat (limited to 'ares_parse_txt_reply.c')
-rw-r--r--ares_parse_txt_reply.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ares_parse_txt_reply.c b/ares_parse_txt_reply.c
index 6583ffb..8e24e63 100644
--- a/ares_parse_txt_reply.c
+++ b/ares_parse_txt_reply.c
@@ -172,14 +172,14 @@ ares_parse_txt_reply (const unsigned char *abuf, int alen,
}
/* Make sure we NULL-terminate */
*((char *) txt_curr->txt + txt_curr->length) = '\0';
-
- /* Move on to the next record */
- aptr += rr_len;
}
/* Don't lose memory in the next iteration */
free (rr_name);
rr_name = NULL;
+
+ /* Move on to the next record */
+ aptr += rr_len;
}
if (hostname)