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

index 3a9ed0feda37551a8af0e4c7231e4d6087055a57..56ca26fe85d53cdaaaf92f250d71a805baf78e67 100644 (file)
@@ -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) {