From 6e860e51d433585428095ddf26c8255fee054b4e Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Thu, 8 Jan 2009 17:19:08 +0000 Subject: [PATCH] - Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT record) --- ext/standard/dns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.50.1