]> 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:19:50 +0000 (17:19 +0000)
committerFelipe Pena <felipe@php.net>
Thu, 8 Jan 2009 17:19:50 +0000 (17:19 +0000)
ext/standard/dns.c

index 8397b8ae8ace210477d466fbdc8097fbf86eda7e..63f24b97d412a978b527709c95e5b30bcb2081fb 100644 (file)
@@ -469,7 +469,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: