Permalink
Browse files

adig: fix NAPTR parsing

I ran across a small "issue" in your adig example.

It is simply the last part of the NAPTR record, the replacement element,
which is not a string, as currently handled in adig, but a domain name.
  • Loading branch information...
Patrik Thunstrom authored and bagder committed Nov 12, 2010
1 parent 6cc3521 commit e9386cfd9f5fab2cfd68053daf83bab3f2e4af82
Showing with 1 addition and 1 deletion.
  1. +1 −1 adig.c
View
2 adig.c
@@ -744,7 +744,7 @@ static const unsigned char *display_rr(const unsigned char *aptr,
ares_free_string(name.as_char);
p += len;
- status = ares_expand_string(p, abuf, alen, &name.as_uchar, &len);
+ status = ares_expand_name(p, abuf, alen, &name.as_char, &len);
if (status != ARES_SUCCESS)
return NULL;
printf("\t\t\t\t\t\t%s", name.as_char);

0 comments on commit e9386cf

Please sign in to comment.