]> granicus.if.org Git - php/commitdiff
- Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT record)
authorFelipe Pena <felipe@php.net>
Thu, 8 Jan 2009 17:19:08 +0000 (17:19 +0000)
committerFelipe Pena <felipe@php.net>
Thu, 8 Jan 2009 17:19:08 +0000 (17:19 +0000)
ext/standard/dns.c

index 1f7b2861c24f799c58bac17e14a5d2924933af97..06c1003dc3459c0dec8e63fbd6e45e7695dfae12 100644 (file)
@@ -470,7 +470,7 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int
                                tp[dlen] = '\0';
                                cp += dlen;
 
-                               add_ascii_assoc_rt_stringl(*subarray, "txt", tp, dlen, ZSTR_AUTOFREE);
+                               add_ascii_assoc_rt_stringl(*subarray, "txt", tp, dlen - 1, ZSTR_AUTOFREE);
                        }
                        break;
                case DNS_T_SOA: