]> granicus.if.org Git - php/commitdiff
MFH: fix problem with garbage appearing in hostnames
authorAntony Dovgal <tony2001@php.net>
Tue, 25 Oct 2005 08:19:33 +0000 (08:19 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 25 Oct 2005 08:19:33 +0000 (08:19 +0000)
ext/standard/dns.c

index e139910e17bc1ab7eb78fb6f82015c4afbde5aba..ffe8d0b702acdbf9f6b6466e284e9563725b1176 100644 (file)
@@ -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) {