[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard dns.c

2008-11-03 Thread Felipe Pena
felipe  Mon Nov  3 11:39:34 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   dns.c 
/php-srcNEWS 
  Log:
  - MFH: Fixed bug #42855 (dns_get_record() doesn't return all text from TXT 
record)
patch by: a dot u dot savchuk at gmail dot com
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.70.2.7.2.6r2=1.70.2.7.2.7diff_format=u
Index: php-src/ext/standard/dns.c
diff -u php-src/ext/standard/dns.c:1.70.2.7.2.6 
php-src/ext/standard/dns.c:1.70.2.7.2.7
--- php-src/ext/standard/dns.c:1.70.2.7.2.6 Mon Dec 31 07:20:12 2007
+++ php-src/ext/standard/dns.c  Mon Nov  3 11:39:34 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: dns.c,v 1.70.2.7.2.6 2007/12/31 07:20:12 sebastian Exp $ */
+/* $Id: dns.c,v 1.70.2.7.2.7 2008/11/03 11:39:34 felipe Exp $ */
 
 /* {{{ includes */
 #include php.h
@@ -472,14 +472,23 @@
add_assoc_stringl(*subarray, os, cp, n, 1);
cp += n;
break;
-   case DNS_T_TXT:
-   add_assoc_string(*subarray, type, TXT, 1);
-   n = cp[0];
-   tp = emalloc(n + 1);
-   memcpy(tp, cp + 1, n);
-   tp[n] = '\0';
-   cp += dlen;
-   add_assoc_stringl(*subarray, txt, tp, n, 0);
+   case DNS_T_TXT: 
+   {
+   int ll = 0;
+
+   add_assoc_string(*subarray, type, TXT, 1);
+   tp = emalloc(dlen + 1);
+   
+   while (ll  dlen) {
+   n = cp[ll];
+   memcpy(tp + ll , cp + ll + 1, n);
+   ll = ll + n + 1;
+   }
+   tp[dlen] = '\0';
+   cp += dlen;
+
+   add_assoc_stringl(*subarray, txt, tp, dlen, 
0);
+   }
break;
case DNS_T_SOA:
add_assoc_string(*subarray, type, SOA, 1);
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1292r2=1.2027.2.547.2.1293diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1292 php-src/NEWS:1.2027.2.547.2.1293
--- php-src/NEWS:1.2027.2.547.2.1292Sun Nov  2 22:04:40 2008
+++ php-src/NEWSMon Nov  3 11:39:34 2008
@@ -26,6 +26,8 @@
 - Fixed bug #43452 (strings containing a weekday, or a number plus weekday
   behaved incorrect of the current day-of-week was the same as the one in the
   phrase).(Derick)
+- Fixed bug #42855 (dns_get_record() doesn't return all text from TXT record).
+  (a dot u dot savchuk at gmail dot com)
 - Fixed bug #42718 (FILTER_UNSAFE_RAW not applied when configured as default
   filter). (Arnaud)
 - Fixed bug #42294 (Unified solution for round() based on C99 round). (Ilia)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard dns.c

2007-06-26 Thread Antony Dovgal
tony2001Tue Jun 26 11:04:56 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/standard   dns.c 
  Log:
  MFH: fix #41795 (checkdnsrr does not support DNS_TXT type)
  patch by lucas at facebook dot com
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.800r2=1.2027.2.547.2.801diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.800 php-src/NEWS:1.2027.2.547.2.801
--- php-src/NEWS:1.2027.2.547.2.800 Tue Jun 26 01:24:09 2007
+++ php-src/NEWSTue Jun 26 11:04:55 2007
@@ -36,6 +36,8 @@
 - Fixed PECL bug #11216 (crash in ZipArchive::addEmptyDir when a directory 
   already exists). (Pierre)
 
+- Fixed bug #41795 (checkdnsrr does not support DNS_TXT type). 
+  (lucas at facebook dot com, Tony)
 - Fixed bug #41773 (php_strip_whitespace() sends headers with errors 
   suppressed). (Tony)
 - Fixed bug #41765 (Recode crashes/does not work on amd64). 
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.70.2.7.2.4r2=1.70.2.7.2.5diff_format=u
Index: php-src/ext/standard/dns.c
diff -u php-src/ext/standard/dns.c:1.70.2.7.2.4 
php-src/ext/standard/dns.c:1.70.2.7.2.5
--- php-src/ext/standard/dns.c:1.70.2.7.2.4 Mon May 14 11:33:34 2007
+++ php-src/ext/standard/dns.c  Tue Jun 26 11:04:55 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: dns.c,v 1.70.2.7.2.4 2007/05/14 11:33:34 tony2001 Exp $ */
+/* $Id: dns.c,v 1.70.2.7.2.5 2007/06/26 11:04:55 tony2001 Exp $ */
 
 /* {{{ includes */
 #include php.h
@@ -289,6 +289,7 @@
else if (!strcasecmp(PTR,   Z_STRVAL_PP(arg2))) type 
= DNS_T_PTR;
else if (!strcasecmp(ANY,   Z_STRVAL_PP(arg2))) type 
= DNS_T_ANY;
else if (!strcasecmp(SOA,   Z_STRVAL_PP(arg2))) type 
= DNS_T_SOA;
+   else if (!strcasecmp(TXT,   Z_STRVAL_PP(arg2))) type 
= DNS_T_TXT;
else if (!strcasecmp(CNAME, Z_STRVAL_PP(arg2))) type 
= DNS_T_CNAME;
else if (!strcasecmp(,  Z_STRVAL_PP(arg2))) type 
= DNS_T_;
else if (!strcasecmp(SRV,   Z_STRVAL_PP(arg2))) type 
= DNS_T_SRV;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php