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

index 6fd0d7a5e5e3585c62ae4d89b9ed2ff8c5e7df35..1bef335cb65b05d751988d291260e26353403924 100644 (file)
@@ -487,7 +487,7 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int
                                tp[dlen] = '\0';
                                cp += dlen;
 
-                               add_assoc_stringl(*subarray, "txt", tp, dlen, 0);
+                               add_assoc_stringl(*subarray, "txt", tp, dlen - 1, 0);
                        }
                        break;
                case DNS_T_SOA: