]> granicus.if.org Git - php/commitdiff
HINFO RDATA is <label><label> not <nshort><nshort>
authorSara Golemon <pollita@php.net>
Tue, 6 May 2003 19:51:46 +0000 (19:51 +0000)
committerSara Golemon <pollita@php.net>
Tue, 6 May 2003 19:51:46 +0000 (19:51 +0000)
ext/standard/dns.c

index 7a91223394cf06d3403b6be15293cec65b881e47..3e08c54c2ed62806d2f57228e9d8b85a84225a7c 100644 (file)
@@ -394,10 +394,14 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int
                case T_HINFO:
                        /* See RFC 1010 for values */
                        add_assoc_string(*subarray, "type", "HINFO", 1);
-                       GETSHORT(n, cp);
-                       add_assoc_long(*subarray, "cpu", n);
-                       GETSHORT(n, cp);
-                       add_assoc_long(*subarray, "os", n);
+                       n = *cp & 0xFF;
+                       cp++;
+                       add_assoc_stringl(*subarray, "cpu", cp, n, 1);
+                       cp += n;
+                       n = *cp & 0xFF;
+                       cp++;
+                       add_assoc_stringl(*subarray, "os", cp, n, 1);
+                       cp += n;
                        break;
                case T_TXT:
                        add_assoc_string(*subarray, "type", "TXT", 1);