mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
(res_nmkquery): Call ns_name_compress directly instead of going through dn_comp.
This commit is contained in:
@@ -160,7 +160,10 @@ res_nmkquery(res_state statp,
|
|||||||
if ((buflen -= QFIXEDSZ) < 0)
|
if ((buflen -= QFIXEDSZ) < 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
compose:
|
compose:
|
||||||
if ((n = dn_comp(dname, cp, buflen, dnptrs, lastdnptr)) < 0)
|
n = ns_name_compress(dname, cp, buflen,
|
||||||
|
(const u_char **) dnptrs,
|
||||||
|
(const u_char **) lastdnptr);
|
||||||
|
if (n < 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
cp += n;
|
cp += n;
|
||||||
buflen -= n;
|
buflen -= n;
|
||||||
@@ -172,7 +175,9 @@ res_nmkquery(res_state statp,
|
|||||||
/*
|
/*
|
||||||
* Make an additional record for completion domain.
|
* Make an additional record for completion domain.
|
||||||
*/
|
*/
|
||||||
n = dn_comp((char *)data, cp, buflen, dnptrs, lastdnptr);
|
n = ns_name_compress((char *)data, cp, buflen,
|
||||||
|
(const u_char **) dnptrs,
|
||||||
|
(const u_char **) lastdnptr);
|
||||||
if (__builtin_expect (n < 0, 0))
|
if (__builtin_expect (n < 0, 0))
|
||||||
return (-1);
|
return (-1);
|
||||||
cp += n;
|
cp += n;
|
||||||
|
Reference in New Issue
Block a user