This fixes an issue when a CNAME was returned for an A query. Garbage was returned.
Postfix was affected of this. Signed-off-by: Natanael Copa <[email protected]> --- libc/inet/resolv.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index e6dac1a..0eb59f3 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -1604,11 +1604,10 @@ int res_query(const char *dname, int class, int type, free(a.dotted); - if (a.atype == type) { /* CNAME */ - if (i > anslen) - i = anslen; - memcpy(answer, packet, i); - } + if (i > anslen) + i = anslen; + memcpy(answer, packet, i); + free(packet); return i; } -- 1.6.5.2 _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
