From e90fd61a77e706e561e108284165a60763ad2fa6 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 25 Oct 2005 08:19:11 +0000 Subject: [PATCH] fix problem with garbage appearing in hostnames --- ext/standard/dns.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 3a9ed0feda..56ca26fe85 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -387,7 +387,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; @@ -404,6 +404,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) { -- 2.40.0