[PATCH] nss_dns: Enforce QDCOUNT == 1 in getnetby* implementation
DJ Delorie
dj@redhat.com
Mon Mar 11 21:22:00 GMT 2019
Florian Weimer <fweimer@redhat.com> writes:
> The stub resolver sends a query with one question record, so if
> the answer contains a different number, the DNS message is
> corrupted.
The resolver now returns a different error code when question_count is
zero. Is this intentional? Does this need to be documented anywhere?
> + if (n < 0 || end_of_message - (cp + n) < QFIXEDSZ)
> + goto bad_message;
And this part sets errno, which it didn't before.
More information about the Libc-alpha
mailing list