From: Antony Dovgal Date: Tue, 25 Oct 2005 08:19:33 +0000 (+0000) Subject: MFH: fix problem with garbage appearing in hostnames X-Git-Tag: php-5.1.0RC4~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a0c8d5d80aa62d956bf1513de7dad391ff2f0af9;p=php MFH: fix problem with garbage appearing in hostnames --- diff --git a/ext/standard/dns.c b/ext/standard/dns.c index e139910e17..ffe8d0b702 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -379,7 +379,7 @@ static void _php_dns_free_res(struct __res_state res) { /* {{{ */ /* {{{ php_parserr */ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int store, zval **subarray) { - u_short type, dlen; + u_short type, class, dlen; u_long ttl; long n, i; u_short s; @@ -396,6 +396,7 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int cp += n; GETSHORT(type, cp); + GETSHORT(class, cp); GETLONG(ttl, cp); GETSHORT(dlen, cp); if (type_to_fetch != T_ANY && type != type_to_fetch) {