From: Felipe Pena Date: Thu, 8 Jan 2009 17:19:08 +0000 (+0000) Subject: - Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT record) X-Git-Tag: php-5.4.0alpha1~191^2~4593 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e860e51d433585428095ddf26c8255fee054b4e;p=php - Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT record) --- diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 1f7b2861c2..06c1003dc3 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -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: