mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Fix tests for existence of second reply.
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
2008-10-24 Ulrich Drepper <drepper@redhat.com>
|
2008-10-24 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* resolv/res_query.c (__libc_res_nquery): Add a few casts.
|
* resolv/res_query.c (__libc_res_nquery): Add a few casts.
|
||||||
|
Fix tests for existence of second reply.
|
||||||
|
|
||||||
2008-10-23 Ulrich Drepper <drepper@redhat.com>
|
2008-10-23 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
@ -244,14 +244,14 @@ __libc_res_nquery(res_state statp,
|
|||||||
tests of HP2. */
|
tests of HP2. */
|
||||||
HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
|
HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
|
||||||
|
|
||||||
if (n < (int) sizeof (HEADER) && nanswerp2 != NULL
|
if (n < (int) sizeof (HEADER) && answerp2 != NULL
|
||||||
&& *nanswerp2 > (int) sizeof (HEADER))
|
&& *resplen2 > (int) sizeof (HEADER))
|
||||||
{
|
{
|
||||||
/* Special case of partial answer. */
|
/* Special case of partial answer. */
|
||||||
assert (hp != hp2);
|
assert (hp != hp2);
|
||||||
hp = hp2;
|
hp = hp2;
|
||||||
}
|
}
|
||||||
else if (nanswerp2 != NULL && *nanswerp2 < (int) sizeof (HEADER)
|
else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
|
||||||
&& n > (int) sizeof (HEADER))
|
&& n > (int) sizeof (HEADER))
|
||||||
{
|
{
|
||||||
/* Special case of partial answer. */
|
/* Special case of partial answer. */
|
||||||
|
Reference in New Issue
Block a user