[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2007-05-10 Thread changelog
changelog   Fri May 11 01:31:14 2007 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2684r2=1.2685diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2684 php-src/ChangeLog:1.2685
--- php-src/ChangeLog:1.2684Thu May 10 01:31:07 2007
+++ php-src/ChangeLog   Fri May 11 01:31:13 2007
@@ -1,3 +1,118 @@
+2007-05-10  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  ext/standard/string.c
+  ext/standard/tests/strings/strripos_offset.phpt:
+  MFH: fix segfault in strripos() when offset == INT_MAX+1
+  identified and repoted by Joxean Koret
+
+* ext/standard/string.c
+  ext/standard/tests/strings/strripos_offset.phpt
+  ext/standard/tests/strings/strripos_offset.phpt:
+  fix segfault in strripos() when offset == INT_MAX+1
+  identified and repoted by Joxean Koret
+
+* ext/soap/php_http.c:
+  add missing header
+
+* (PHP_5_2)
+  ext/soap/php_http.c:
+  %d - %ld
+
+* ext/soap/php_http.c:
+  MFB
+
+2007-05-10  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/soap/php_http.c:
+  
+  Fixed random number generation for http auth mechanism in SOAP
+  
+
+2007-05-10  Hannes Magnusson  [EMAIL PROTECTED]
+
+* main/php_ini.c:
+  MFB - use php_strtok_r() rather than strsep()
+
+* (PHP_5_2)
+  main/php_ini.c:
+  use php_strtok_r() rather than strsep()
+
+2007-05-10  Antony Dovgal  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  ext/standard/basic_functions.c
+  ext/standard/tests/strings/005.phpt
+  ext/standard/tests/strings/006.phpt
+  ext/standard/tests/strings/007.phpt:
+  MFH: flush output buffer when/if
+  highlight_string()/php_strip_whitespace()/highlight_string() fail
+
+* ext/standard/basic_functions.c
+  ext/standard/tests/strings/005.phpt
+  ext/standard/tests/strings/005.phpt
+  ext/standard/tests/strings/006.phpt
+  ext/standard/tests/strings/006.phpt
+  ext/standard/tests/strings/007.phpt
+  ext/standard/tests/strings/007.phpt:
+  flush output buffer when/if
+  highlight_string()/php_strip_whitespace()/highlight_string() fail
+
+2007-05-10  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_5_2)
+  NEWS
+  sapi/cgi/fastcgi.c
+  sapi/cgi/fastcgi.c:
+  Fixed bug #41291 (FastCGI does not set SO_REUSEADDR). (fmajid at kefta 
dot
+  com)
+
+* (PHP_5_2)
+  NEWS
+  ext/soap/php_sdl.c
+  ext/soap/php_sdl.c
+  ext/soap/tests/bugs/bug41337.phpt
+  ext/soap/tests/bugs/bug41337.phpt
+  ext/soap/tests/bugs/bug41337.phpt
+  ext/soap/tests/bugs/bug41337.wsdl
+  ext/soap/tests/bugs/bug41337.wsdl
+  ext/soap/tests/bugs/bug41337.wsdl:
+  Fixed bug #41337 (WSDL parsing doesn't ignore non soap bindings)
+
+2007-05-10  Scott MacVicar  [EMAIL PROTECTED]
+
+* ext/standard/tests/network/bug41347.phpt
+  ext/standard/tests/network/bug41347.phpt:
+  
+  file bug41347.phpt was initially added on branch PHP_5_2.
+
+* (PHP_5_2)
+  NEWS
+  ext/standard/dns.c:
+  Fixed bug #41347 (checkdnsrr() segfaults on empty hostname).
+
+2007-05-10  Antony Dovgal  [EMAIL PROTECTED]
+
+* ext/standard/tests/image/iptcembed_001.phpt
+  ext/standard/tests/image/iptcembed_001.phpt:
+  
+  cleanup temp test data
+
+* ext/standard/iptc.c
+  ext/standard/tests/image/iptcembed_001.phpt:
+  fix segfault in iptcembed()
+
+* (PHP_5_2)
+  ext/bcmath/bcmath.c:
+  MFH: bcmath.scale must be greater or equal to zero
+
+* ext/bcmath/bcmath.c:
+  bcmath.scale must be greater or equal to zero
+  looks like negative value cannot cause any problems, but it's still
+  invalid
+
 2007-05-09  Ilia Alshanetsky  [EMAIL PROTECTED]
 
 * (PHP_5_2)


[PHP-CVS] cvs: php-src /ext/bcmath bcmath.c

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 09:53:28 2007 UTC

  Modified files:  
/php-src/ext/bcmath bcmath.c 
  Log:
  bcmath.scale must be greater or equal to zero
  looks like negative value cannot cause any problems, but it's still invalid
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/bcmath/bcmath.c?r1=1.70r2=1.71diff_format=u
Index: php-src/ext/bcmath/bcmath.c
diff -u php-src/ext/bcmath/bcmath.c:1.70 php-src/ext/bcmath/bcmath.c:1.71
--- php-src/ext/bcmath/bcmath.c:1.70Mon Jan  1 09:29:21 2007
+++ php-src/ext/bcmath/bcmath.c Thu May 10 09:53:28 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: bcmath.c,v 1.70 2007/01/01 09:29:21 sebastian Exp $ */
+/* $Id: bcmath.c,v 1.71 2007/05/10 09:53:28 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -142,7 +142,7 @@
 
 /* {{{ PHP_INI */
 PHP_INI_BEGIN()
-   STD_PHP_INI_ENTRY(bcmath.scale, 0, PHP_INI_ALL, OnUpdateLong, 
bc_precision, zend_bcmath_globals, bcmath_globals)
+   STD_PHP_INI_ENTRY(bcmath.scale, 0, PHP_INI_ALL, OnUpdateLongGEZero, 
bc_precision, zend_bcmath_globals, bcmath_globals)
 PHP_INI_END()
 /* }}} */
 

-- 
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) /ext/bcmath bcmath.c

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 09:53:37 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/bcmath bcmath.c 
  Log:
  MFH: bcmath.scale must be greater or equal to zero
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/bcmath/bcmath.c?r1=1.62.2.2.2.5r2=1.62.2.2.2.6diff_format=u
Index: php-src/ext/bcmath/bcmath.c
diff -u php-src/ext/bcmath/bcmath.c:1.62.2.2.2.5 
php-src/ext/bcmath/bcmath.c:1.62.2.2.2.6
--- php-src/ext/bcmath/bcmath.c:1.62.2.2.2.5Mon Jan  1 09:35:48 2007
+++ php-src/ext/bcmath/bcmath.c Thu May 10 09:53:36 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: bcmath.c,v 1.62.2.2.2.5 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: bcmath.c,v 1.62.2.2.2.6 2007/05/10 09:53:36 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -142,7 +142,7 @@
 
 /* {{{ PHP_INI */
 PHP_INI_BEGIN()
-   STD_PHP_INI_ENTRY(bcmath.scale, 0, PHP_INI_ALL, OnUpdateLong, 
bc_precision, zend_bcmath_globals, bcmath_globals)
+   STD_PHP_INI_ENTRY(bcmath.scale, 0, PHP_INI_ALL, OnUpdateLongGEZero, 
bc_precision, zend_bcmath_globals, bcmath_globals)
 PHP_INI_END()
 /* }}} */
 

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



[PHP-CVS] cvs: php-src /ext/standard iptc.c /ext/standard/tests/image iptcembed_001.phpt

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 12:21:42 2007 UTC

  Added files: 
/php-src/ext/standard/tests/image   iptcembed_001.phpt 

  Modified files:  
/php-src/ext/standard   iptc.c 
  Log:
  fix segfault in iptcembed()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/iptc.c?r1=1.60r2=1.61diff_format=u
Index: php-src/ext/standard/iptc.c
diff -u php-src/ext/standard/iptc.c:1.60 php-src/ext/standard/iptc.c:1.61
--- php-src/ext/standard/iptc.c:1.60Mon Feb 12 20:27:48 2007
+++ php-src/ext/standard/iptc.c Thu May 10 12:21:42 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: iptc.c,v 1.60 2007/02/12 20:27:48 tony2001 Exp $ */
+/* $Id: iptc.c,v 1.61 2007/05/10 12:21:42 tony2001 Exp $ */
 
 /*
  * Functions to parse  compse IPTC data.
@@ -211,16 +211,16 @@
 
if (php_iptc_get1(fp, spool, poi?poi:0 TSRMLS_CC) != 0xFF) {
fclose(fp);
-   if (poi) {
-   efree(poi);
+   if (spoolbuf) {
+   efree(spoolbuf);
}
RETURN_FALSE;
}
 
if (php_iptc_get1(fp, spool, poi?poi:0 TSRMLS_CC) != 0xD8) {
fclose(fp);
-   if (poi) {
-   efree(poi);
+   if (spoolbuf) {
+   efree(spoolbuf);
}
RETURN_FALSE;
}

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/iptcembed_001.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/image/iptcembed_001.phpt
+++ php-src/ext/standard/tests/image/iptcembed_001.phpt
--TEST--
iptcembed() and wrong file
--FILE--
?php

$file = dirname(__FILE__).'/iptcembed_001.data';
$fp = fopen($file, w);
fwrite($fp, b-1-1);
fclose($fp);

var_dump(iptcembed(-1, $file, -1));

echo Done\n;
?
--EXPECTF--
bool(false)
Done

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



[PHP-CVS] cvs: php-src /ext/standard/tests/image iptcembed_001.phpt

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 12:22:49 2007 UTC

  Modified files:  
/php-src/ext/standard/tests/image   iptcembed_001.phpt 
  Log:
  cleanup temp test data
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/iptcembed_001.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/standard/tests/image/iptcembed_001.phpt
diff -u php-src/ext/standard/tests/image/iptcembed_001.phpt:1.1 
php-src/ext/standard/tests/image/iptcembed_001.phpt:1.2
--- php-src/ext/standard/tests/image/iptcembed_001.phpt:1.1 Thu May 10 
12:21:42 2007
+++ php-src/ext/standard/tests/image/iptcembed_001.phpt Thu May 10 12:22:49 2007
@@ -9,6 +9,7 @@
 fclose($fp);
 
 var_dump(iptcembed(-1, $file, -1));
+unlink($file);
 
 echo Done\n;
 ?

-- 
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) /ext/standard iptc.c /ext/standard/tests/image iptcembed_001.phpt

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 12:23:25 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/image   iptcembed_001.phpt 

  Modified files:  
/php-src/ext/standard   iptc.c 
  Log:
  MFH: fix segfault in iptcembed()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/iptc.c?r1=1.50.2.2.2.4r2=1.50.2.2.2.5diff_format=u
Index: php-src/ext/standard/iptc.c
diff -u php-src/ext/standard/iptc.c:1.50.2.2.2.4 
php-src/ext/standard/iptc.c:1.50.2.2.2.5
--- php-src/ext/standard/iptc.c:1.50.2.2.2.4Mon Feb 12 20:40:11 2007
+++ php-src/ext/standard/iptc.c Thu May 10 12:23:25 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: iptc.c,v 1.50.2.2.2.4 2007/02/12 20:40:11 tony2001 Exp $ */
+/* $Id: iptc.c,v 1.50.2.2.2.5 2007/05/10 12:23:25 tony2001 Exp $ */
 
 /*
  * Functions to parse  compse IPTC data.
@@ -212,16 +212,16 @@
 
if (php_iptc_get1(fp, spool, poi?poi:0 TSRMLS_CC) != 0xFF) {
fclose(fp);
-   if (poi) {
-   efree(poi);
+   if (spoolbuf) {
+   efree(spoolbuf);
}
RETURN_FALSE;
}
 
if (php_iptc_get1(fp, spool, poi?poi:0 TSRMLS_CC) != 0xD8) {
fclose(fp);
-   if (poi) {
-   efree(poi);
+   if (spoolbuf) {
+   efree(spoolbuf);
}
RETURN_FALSE;
}

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/image/iptcembed_001.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/image/iptcembed_001.phpt
+++ php-src/ext/standard/tests/image/iptcembed_001.phpt
--TEST--
iptcembed() and wrong file
--FILE--
?php

$file = dirname(__FILE__).'/iptcembed_001.data';
$fp = fopen($file, w);
fwrite($fp, b-1-1);
fclose($fp);

var_dump(iptcembed(-1, $file, -1));

echo Done\n;
?
--EXPECTF--
bool(false)
Done

-- 
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

2007-05-10 Thread Scott MacVicar
scottmacThu May 10 13:16:51 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  Fixed bug #41347 (checkdnsrr() segfaults on empty hostname).
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.691r2=1.2027.2.547.2.692diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.691 php-src/NEWS:1.2027.2.547.2.692
--- php-src/NEWS:1.2027.2.547.2.691 Wed May  9 23:59:06 2007
+++ php-src/NEWSThu May 10 13:16:51 2007
@@ -7,6 +7,7 @@
   (Ilia)
 - Fixed altering $this via argument named this. (Dmitry)
 - Fixed PHP CLI to use the php.ini from the binary location. (Hannes)
+- Fixed bug #41347 (checkdnsrr() segfaults on empty hostname). (Scott)
 - Fixed bug #41326 (Writing empty tags with Xmlwriter::WriteElement[ns])
   (Pierre)
 - Fixed bug #41321 (downgrade read errors in getimagesize() to E_NOTICE).

-- 
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) /ext/standard dns.c /ext/standard/tests/network bug41347.phpt

2007-05-10 Thread Scott MacVicar
scottmacThu May 10 13:16:54 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/network bug41347.phpt 

  Modified files:  
/php-src/ext/standard   dns.c 
  Log:
  Fixed bug #41347 (checkdnsrr() segfaults on empty hostname).
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dns.c?r1=1.70.2.7.2.2r2=1.70.2.7.2.3diff_format=u
Index: php-src/ext/standard/dns.c
diff -u php-src/ext/standard/dns.c:1.70.2.7.2.2 
php-src/ext/standard/dns.c:1.70.2.7.2.3
--- php-src/ext/standard/dns.c:1.70.2.7.2.2 Sat Feb 24 02:17:27 2007
+++ php-src/ext/standard/dns.c  Thu May 10 13:16:54 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: dns.c,v 1.70.2.7.2.2 2007/02/24 02:17:27 helly Exp $ */
+/* $Id: dns.c,v 1.70.2.7.2.3 2007/05/10 13:16:54 scottmac Exp $ */
 
 /* {{{ includes */
 #include php.h
@@ -264,6 +264,12 @@
}
type = T_MX;
convert_to_string_ex(arg1);
+   
+   if (Z_STRLEN_PP(arg1) == 0)
+   {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Host cannot be empty);
+   RETURN_FALSE;
+   }
break;
 
case 2:
@@ -273,6 +279,12 @@
convert_to_string_ex(arg1);
convert_to_string_ex(arg2);
 
+   if (Z_STRLEN_PP(arg1) == 0 || Z_STRLEN_PP(arg2) == 0)
+   {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Host and type cannot be empty);
+   RETURN_FALSE;
+   }
+
if (!strcasecmp(A, Z_STRVAL_PP(arg2))) type = T_A;
else if (!strcasecmp(NS,Z_STRVAL_PP(arg2))) type 
= DNS_T_NS;
else if (!strcasecmp(MX,Z_STRVAL_PP(arg2))) type 
= DNS_T_MX;

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/network/bug41347.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/network/bug41347.phpt
+++ php-src/ext/standard/tests/network/bug41347.phpt

-- 
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/soap php_sdl.c /ext/soap/tests/bugs bug41337.phpt bug41337.wsdl

2007-05-10 Thread Dmitry Stogov
dmitry  Thu May 10 14:58:17 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/soap/tests/bugsbug41337.phpt bug41337.wsdl 

  Modified files:  
/php-srcNEWS 
/php-src/ext/soap   php_sdl.c 
  Log:
  Fixed bug #41337 (WSDL parsing doesn't ignore non soap bindings)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.692r2=1.2027.2.547.2.693diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.692 php-src/NEWS:1.2027.2.547.2.693
--- php-src/NEWS:1.2027.2.547.2.692 Thu May 10 13:16:51 2007
+++ php-src/NEWSThu May 10 14:58:17 2007
@@ -8,6 +8,7 @@
 - Fixed altering $this via argument named this. (Dmitry)
 - Fixed PHP CLI to use the php.ini from the binary location. (Hannes)
 - Fixed bug #41347 (checkdnsrr() segfaults on empty hostname). (Scott)
+- Fixed bug #41337 (WSDL parsing doesn't ignore non soap bindings). (Dmitry)
 - Fixed bug #41326 (Writing empty tags with Xmlwriter::WriteElement[ns])
   (Pierre)
 - Fixed bug #41321 (downgrade read errors in getimagesize() to E_NOTICE).
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_sdl.c?r1=1.88.2.12.2.7r2=1.88.2.12.2.8diff_format=u
Index: php-src/ext/soap/php_sdl.c
diff -u php-src/ext/soap/php_sdl.c:1.88.2.12.2.7 
php-src/ext/soap/php_sdl.c:1.88.2.12.2.8
--- php-src/ext/soap/php_sdl.c:1.88.2.12.2.7Fri Feb 23 20:40:55 2007
+++ php-src/ext/soap/php_sdl.c  Thu May 10 14:58:17 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_sdl.c,v 1.88.2.12.2.7 2007/02/23 20:40:55 stas Exp $ */
+/* $Id: php_sdl.c,v 1.88.2.12.2.8 2007/05/10 14:58:17 dmitry Exp $ */
 
 #include php_soap.h
 #include ext/libxml/php_libxml.h
@@ -654,6 +654,7 @@
for (i = 0; i  n; i++) {
xmlNodePtr *tmp, service;
xmlNodePtr trav, port;
+   int has_soap_port = 0;
 
zend_hash_get_current_data(ctx.services, (void 
**)tmp);
service = *tmp;
@@ -716,8 +717,15 @@
  trav2 = trav2-next;
}
if (!address) {
-   soap_error0(E_ERROR, Parsing WSDL: No 
address associated with port);
+   if (has_soap_port || trav-next) {
+   efree(tmpbinding);
+   trav = trav-next;
+   continue;
+   } else {
+   soap_error0(E_ERROR, Parsing 
WSDL: No address associated with port);
+   }
}
+   has_soap_port = 1;
 
location = get_attribute(address-properties, 
location);
if (!location) {

http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug41337.phpt?view=markuprev=1.1
Index: php-src/ext/soap/tests/bugs/bug41337.phpt
+++ php-src/ext/soap/tests/bugs/bug41337.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug41337.wsdl?view=markuprev=1.1
Index: php-src/ext/soap/tests/bugs/bug41337.wsdl
+++ php-src/ext/soap/tests/bugs/bug41337.wsdl

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



[PHP-CVS] cvs: php-src /ext/soap php_sdl.c /ext/soap/tests/bugs bug41337.phpt bug41337.wsdl

2007-05-10 Thread Dmitry Stogov
dmitry  Thu May 10 14:58:32 2007 UTC

  Modified files:  
/php-src/ext/soap   php_sdl.c 
/php-src/ext/soap/tests/bugsbug41337.phpt bug41337.wsdl 
  Log:
  Fixed bug #41337 (WSDL parsing doesn't ignore non soap bindings)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_sdl.c?r1=1.107r2=1.108diff_format=u
Index: php-src/ext/soap/php_sdl.c
diff -u php-src/ext/soap/php_sdl.c:1.107 php-src/ext/soap/php_sdl.c:1.108
--- php-src/ext/soap/php_sdl.c:1.107Mon Jan  1 09:29:29 2007
+++ php-src/ext/soap/php_sdl.c  Thu May 10 14:58:31 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_sdl.c,v 1.107 2007/01/01 09:29:29 sebastian Exp $ */
+/* $Id: php_sdl.c,v 1.108 2007/05/10 14:58:31 dmitry Exp $ */
 
 #include php_soap.h
 #include ext/libxml/php_libxml.h
@@ -654,6 +654,7 @@
for (i = 0; i  n; i++) {
xmlNodePtr *tmp, service;
xmlNodePtr trav, port;
+   int has_soap_port = 0;
 
zend_hash_get_current_data(ctx.services, (void 
**)tmp);
service = *tmp;
@@ -716,8 +717,15 @@
  trav2 = trav2-next;
}
if (!address) {
-   soap_error0(E_ERROR, Parsing WSDL: No 
address associated with port);
+   if (has_soap_port || trav-next) {
+   efree(tmpbinding);
+   trav = trav-next;
+   continue;
+   } else {
+   soap_error0(E_ERROR, Parsing 
WSDL: No address associated with port);
+   }
}
+   has_soap_port = 1;
 
location = get_attribute(address-properties, 
location);
if (!location) {
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug41337.phpt?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/soap/tests/bugs/bug41337.phpt
diff -u /dev/null php-src/ext/soap/tests/bugs/bug41337.phpt:1.2
--- /dev/null   Thu May 10 14:58:32 2007
+++ php-src/ext/soap/tests/bugs/bug41337.phpt   Thu May 10 14:58:32 2007
@@ -0,0 +1,12 @@
+--TEST--
+Bug #41337 (WSDL parsing doesn't ignore non soap bindings)
+--SKIPIF--
+?php require_once('skipif.inc'); ?
+--FILE--
+?php
+ini_set(soap.wsdl_cache_enabled,0);
+$client = new SoapClient(dirname(__FILE__)./bug41337.wsdl);
+echo ok\n;
+?
+--EXPECT--
+ok
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/tests/bugs/bug41337.wsdl?r1=1.1r2=1.2diff_format=u
Index: php-src/ext/soap/tests/bugs/bug41337.wsdl
diff -u /dev/null php-src/ext/soap/tests/bugs/bug41337.wsdl:1.2
--- /dev/null   Thu May 10 14:58:32 2007
+++ php-src/ext/soap/tests/bugs/bug41337.wsdl   Thu May 10 14:58:32 2007
@@ -0,0 +1,63 @@
+?xml version=1.0 ?
+definitions
+xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/;
+xmlns:xsd=http://www.w3.org/2001/XMLSchema;
+xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
+xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/;
+xmlns:si=http://soapinterop.org/xsd;
+xmlns:tns=http://linuxsrv.home/~dmitry/soap/test.wsdl;
+xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
+xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
+xmlns=http://schemas.xmlsoap.org/wsdl/;
+targetNamespace=http://linuxsrv.home/~dmitry/soap/test.wsdl;
+
+  types
+xsd:schema targetNamespace=http://linuxsrv.home/~dmitry/soap/test.wsdl;
+  xsd:import namespace=http://schemas.xmlsoap.org/soap/encoding/; /
+  xsd:import namespace=http://schemas.xmlsoap.org/wsdl/; /
+/xsd:schema
+  /types
+
+  message name=AddRequest
+part name=x type=xsd:double /
+part name=y type=xsd:double /
+  /message
+  message name=AddResponse
+part name=result type=xsd:double /
+  /message
+
+  portType name=TestServicePortType
+operation name=Add
+  input message=tns:AddRequest /
+  output message=tns:AddResponse /
+/operation
+  /portType
+
+  binding name=TestServiceBinding2 type=tns:TestServicePortType
+operation name=Add
+  input/
+  output/
+/operation
+  /binding
+
+  binding name=TestServiceBinding type=tns:TestServicePortType
+soap:binding style=rpc transport=http://schemas.xmlsoap.org/soap/http; 
/
+operation name=Add
+  soap:operation soapAction=Add style=rpc /
+  input
+soap:body use=encoded 
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; /
+  /input
+  output
+soap:body use=encoded 
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; /
+  /output
+/operation
+ 

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /sapi/cgi fastcgi.c

2007-05-10 Thread Dmitry Stogov
dmitry  Thu May 10 15:21:02 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/sapi/cgi   fastcgi.c 
  Log:
  Fixed bug #41291 (FastCGI does not set SO_REUSEADDR). (fmajid at kefta dot 
com)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.693r2=1.2027.2.547.2.694diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.693 php-src/NEWS:1.2027.2.547.2.694
--- php-src/NEWS:1.2027.2.547.2.693 Thu May 10 14:58:17 2007
+++ php-src/NEWSThu May 10 15:21:02 2007
@@ -16,6 +16,8 @@
 - Fixed bug #41304 (compress.zlib temp files left). (Dmitry)
 - Fixed bug #41293 (Fixed creation of HTTP_RAW_POST_DATA when there is no
   default post handler). (Ilia)
+- Fixed bug #41291 (FastCGI does not set SO_REUSEADDR). 
+  (fmajid at kefta dot com, Dmitry)
 - Fixed gd build when used with freetype 1.x (Pierre, Tony)
 - Fixed bug #41287 (Namespace functions don't allow xmlns definition to be 
   optional). (Rob)
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.4.2.13.2.24r2=1.4.2.13.2.25diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.24 
php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.25
--- php-src/sapi/cgi/fastcgi.c:1.4.2.13.2.24Mon Apr  9 15:39:59 2007
+++ php-src/sapi/cgi/fastcgi.c  Thu May 10 15:21:02 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: fastcgi.c,v 1.4.2.13.2.24 2007/04/09 15:39:59 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.4.2.13.2.25 2007/05/10 15:21:02 dmitry Exp $ */
 
 #include php.h
 #include fastcgi.h
@@ -345,6 +345,13 @@
int   listen_socket;
sa_t  sa;
socklen_t sock_len;
+#ifdef SO_REUSEADDR
+# ifdef _WIN32
+   BOOL reuse = 1;
+# else
+   int reuse = 1;
+# endif
+#endif
 
if ((s = strchr(path, ':'))) {
port = atoi(s+1);
@@ -434,6 +441,9 @@
 
/* Create, bind socket and start listen on it */
if ((listen_socket = socket(sa.sa.sa_family, SOCK_STREAM, 0))  0 ||
+#ifdef SO_REUSEADDR
+   setsockopt(listen_socket, SOL_SOCKET, SO_REUSEADDR, (char*)reuse, 
sizeof(reuse))  0 ||
+#endif
bind(listen_socket, (struct sockaddr *) sa, sock_len)  0 ||
listen(listen_socket, backlog)  0) {
 

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



[PHP-CVS] cvs: php-src /sapi/cgi fastcgi.c

2007-05-10 Thread Dmitry Stogov
dmitry  Thu May 10 15:22:15 2007 UTC

  Modified files:  
/php-src/sapi/cgi   fastcgi.c 
  Log:
  Fixed bug #41291 (FastCGI does not set SO_REUSEADDR). (fmajid at kefta dot 
com)
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.37r2=1.38diff_format=u
Index: php-src/sapi/cgi/fastcgi.c
diff -u php-src/sapi/cgi/fastcgi.c:1.37 php-src/sapi/cgi/fastcgi.c:1.38
--- php-src/sapi/cgi/fastcgi.c:1.37 Mon Apr  9 15:40:23 2007
+++ php-src/sapi/cgi/fastcgi.c  Thu May 10 15:22:15 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: fastcgi.c,v 1.37 2007/04/09 15:40:23 dmitry Exp $ */
+/* $Id: fastcgi.c,v 1.38 2007/05/10 15:22:15 dmitry Exp $ */
 
 #include php.h
 #include fastcgi.h
@@ -345,6 +345,13 @@
int   listen_socket;
sa_t  sa;
socklen_t sock_len;
+#ifdef SO_REUSEADDR
+# ifdef _WIN32
+   BOOL reuse = 1;
+# else
+   int reuse = 1;
+# endif
+#endif
 
if ((s = strchr(path, ':'))) {
port = atoi(s+1);
@@ -434,6 +441,9 @@
 
/* Create, bind socket and start listen on it */
if ((listen_socket = socket(sa.sa.sa_family, SOCK_STREAM, 0))  0 ||
+#ifdef SO_REUSEADDR
+   setsockopt(listen_socket, SOL_SOCKET, SO_REUSEADDR, (char*)reuse, 
sizeof(reuse))  0 ||
+#endif
bind(listen_socket, (struct sockaddr *) sa, sock_len)  0 ||
listen(listen_socket, backlog)  0) {
 

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



[PHP-CVS] cvs: php-src /ext/standard basic_functions.c /ext/standard/tests/strings 005.phpt 006.phpt 007.phpt

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 16:27:16 2007 UTC

  Added files: 
/php-src/ext/standard/tests/strings 005.phpt 006.phpt 007.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  flush output buffer when/if 
highlight_string()/php_strip_whitespace()/highlight_string() fail
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.855r2=1.856diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.855 
php-src/ext/standard/basic_functions.c:1.856
--- php-src/ext/standard/basic_functions.c:1.855Tue Apr 17 20:33:45 2007
+++ php-src/ext/standard/basic_functions.c  Thu May 10 16:27:16 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.855 2007/04/17 20:33:45 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.856 2007/05/10 16:27:16 tony2001 Exp $ */
 
 #include php.h
 #include php_streams.h
@@ -5380,6 +5380,9 @@
}
 
if (ret == FAILURE) {
+   if (i) {
+   php_output_end(TSRMLS_C);
+   }
RETURN_FALSE;
}
 
@@ -5420,6 +5423,7 @@
file_handle.opened_path = NULL;
zend_save_lexical_state(original_lex_state TSRMLS_CC);
if (open_file_for_scanning(file_handle TSRMLS_CC)==FAILURE) {
+   php_output_end(TSRMLS_C);
if (filename_type == IS_UNICODE) {
efree(filename);
}
@@ -5478,6 +5482,10 @@
 
if (highlight_string(*expr, syntax_highlighter_ini, 
hicompiled_string_description TSRMLS_CC) == FAILURE) {
efree(hicompiled_string_description);
+   EG(error_reporting) = old_error_reporting;
+   if (i) {
+   php_output_end(TSRMLS_C); 
+   }
RETURN_FALSE;
}
efree(hicompiled_string_description);

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/005.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/005.phpt
+++ php-src/ext/standard/tests/strings/005.phpt
--TEST--
highlight_string(), output buffer and error level
--INI--
error_reporting=8192
--FILE--
?php

echo hello\n;

$string = str_repeat(A, 1024);

var_dump(error_reporting());
highlight_string($string, true);
var_dump(ob_get_contents());
var_dump(error_reporting());

echo Done\n;
?
--EXPECTF-- 
hello
int(8192)
bool(false)
int(8192)
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/006.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/006.phpt
+++ php-src/ext/standard/tests/strings/006.phpt
--TEST--
highlight_file() and output buffer
--FILE--
?php

$file = str_repeat(A, 1024);

var_dump(highlight_file($file, true));
var_dump(ob_get_contents());

echo Done\n;
?
--EXPECTF-- 
Warning: 
highlight_file(A!
  in %s on line %d

Warning: highlight_file(): Failed opening 
'AA!
 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard basic_functions.c /ext/standard/tests/strings 005.phpt 006.phpt 007.phpt

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 16:28:11 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings 005.phpt 006.phpt 007.phpt 

  Modified files:  
/php-src/ext/standard   basic_functions.c 
  Log:
  MFH: flush output buffer when/if 
highlight_string()/php_strip_whitespace()/highlight_string() fail
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.49r2=1.725.2.31.2.50diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.49 
php-src/ext/standard/basic_functions.c:1.725.2.31.2.50
--- php-src/ext/standard/basic_functions.c:1.725.2.31.2.49  Tue Apr 17 
20:34:14 2007
+++ php-src/ext/standard/basic_functions.c  Thu May 10 16:28:11 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: basic_functions.c,v 1.725.2.31.2.49 2007/04/17 20:34:14 tony2001 Exp $ 
*/
+/* $Id: basic_functions.c,v 1.725.2.31.2.50 2007/05/10 16:28:11 tony2001 Exp $ 
*/
 
 #include php.h
 #include php_streams.h
@@ -5447,6 +5447,9 @@
php_get_highlight_struct(syntax_highlighter_ini);
 
if (highlight_file(filename, syntax_highlighter_ini TSRMLS_CC) == 
FAILURE) {
+   if (i) { 
+   php_end_ob_buffer (1, 0 TSRMLS_CC); 
+   }
RETURN_FALSE;
}
 
@@ -5480,6 +5483,8 @@
file_handle.opened_path = NULL;
zend_save_lexical_state(original_lex_state TSRMLS_CC);
if (open_file_for_scanning(file_handle TSRMLS_CC)==FAILURE) {
+   zend_restore_lexical_state(original_lex_state TSRMLS_CC);
+   php_end_ob_buffer(1, 0 TSRMLS_CC);
RETURN_EMPTY_STRING();
}
 
@@ -5522,6 +5527,10 @@
 
if (highlight_string(*expr, syntax_highlighter_ini, 
hicompiled_string_description TSRMLS_CC) == FAILURE) {
efree(hicompiled_string_description);
+   EG(error_reporting) = old_error_reporting;
+   if (i) {
+   php_end_ob_buffer (1, 0 TSRMLS_CC); 
+   }
RETURN_FALSE;
}
efree(hicompiled_string_description);

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/005.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/005.phpt
+++ php-src/ext/standard/tests/strings/005.phpt
--TEST--
highlight_string(), output buffer and error level
--INI--
error_reporting=8192
--FILE--
?php

echo hello\n;

$string = str_repeat(A, 1024);

var_dump(error_reporting());
highlight_string($string, true);
var_dump(ob_get_contents());
var_dump(error_reporting());

echo Done\n;
?
--EXPECTF-- 
hello
int(8192)
bool(false)
int(8192)
Done

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/006.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/006.phpt
+++ php-src/ext/standard/tests/strings/006.phpt
--TEST--
highlight_file() and output buffer
--FILE--
?php

$file = str_repeat(A, 1024);

var_dump(highlight_file($file, true));
var_dump(ob_get_contents());

echo Done\n;
?
--EXPECTF-- 
Warning: 
highlight_file(A!
  in %s on line %d

Warning: highlight_file(): Failed opening 

[PHP-CVS] cvs: php-src(PHP_5_2) /main php_ini.c

2007-05-10 Thread Hannes Magnusson
bjori   Thu May 10 19:48:30 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   php_ini.c 
  Log:
  use php_strtok_r() rather than strsep()
  # Fixes build on, for instance, solaris
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.136.2.4.2.9r2=1.136.2.4.2.10diff_format=u
Index: php-src/main/php_ini.c
diff -u php-src/main/php_ini.c:1.136.2.4.2.9 
php-src/main/php_ini.c:1.136.2.4.2.10
--- php-src/main/php_ini.c:1.136.2.4.2.9Sun May  6 14:01:26 2007
+++ php-src/main/php_ini.c  Thu May 10 19:48:30 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_ini.c,v 1.136.2.4.2.9 2007/05/06 14:01:26 bjori Exp $ */
+/* $Id: php_ini.c,v 1.136.2.4.2.10 2007/05/10 19:48:30 bjori Exp $ */
 
 #include php.h
 #include ext/standard/info.h
@@ -359,13 +359,16 @@
 
if ((path = getenv(PATH)) != NULL) {
char *search_dir, 
search_path[MAXPATHLEN];
+   char *last;
 
-   while ((search_dir = strsep(path, 
:)) != NULL) {
+   search_dir = php_strtok_r(path, :, 
last);
+   while (search_dir) {
snprintf(search_path, 
MAXPATHLEN, %s/%s, search_dir, sapi_module.executable_location);
if (VCWD_REALPATH(search_path, 
binary_location)  !VCWD_ACCESS(binary_location, X_OK)) {
found = 1;
break;
}
+   search_dir = php_strtok_r(NULL, 
:, last);
}
}
if (!found) {

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



[PHP-CVS] cvs: php-src /main php_ini.c

2007-05-10 Thread Hannes Magnusson
bjori   Thu May 10 19:51:19 2007 UTC

  Modified files:  
/php-src/main   php_ini.c 
  Log:
  MFB - use php_strtok_r() rather than strsep()
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.150r2=1.151diff_format=u
Index: php-src/main/php_ini.c
diff -u php-src/main/php_ini.c:1.150 php-src/main/php_ini.c:1.151
--- php-src/main/php_ini.c:1.150Wed Apr 25 10:02:23 2007
+++ php-src/main/php_ini.c  Thu May 10 19:51:19 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_ini.c,v 1.150 2007/04/25 10:02:23 bjori Exp $ */
+/* $Id: php_ini.c,v 1.151 2007/05/10 19:51:19 bjori Exp $ */
 
 #include php.h
 #include ext/standard/info.h
@@ -357,13 +357,16 @@
 
if ((path = getenv(PATH)) != NULL) {
char *search_dir, 
search_path[MAXPATHLEN];
+   char *last;
 
-   while ((search_dir = strsep(path, 
:)) != NULL) {
+   search_dir = php_strtok_r(path, :, 
last);
+   while (search_dir) {
snprintf(search_path, 
MAXPATHLEN, %s/%s, search_dir, sapi_module.executable_location);
if (VCWD_REALPATH(search_path, 
binary_location)  !VCWD_ACCESS(binary_location, X_OK)) {
found = 1;
break;
}
+   search_dir = php_strtok_r(NULL, 
:, last);
}
}
if (!found) {

-- 
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) /ext/soap php_http.c

2007-05-10 Thread Ilia Alshanetsky
iliaa   Thu May 10 21:05:14 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/soap   php_http.c 
  Log:
  
  Fixed random number generation for http auth mechanism in SOAP
  
  # Identified by Stefan Esser
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.77.2.11.2.8r2=1.77.2.11.2.9diff_format=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.77.2.11.2.8 
php-src/ext/soap/php_http.c:1.77.2.11.2.9
--- php-src/ext/soap/php_http.c:1.77.2.11.2.8   Sat Feb 24 02:17:26 2007
+++ php-src/ext/soap/php_http.c Thu May 10 21:05:14 2007
@@ -17,11 +17,12 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_http.c,v 1.77.2.11.2.8 2007/02/24 02:17:26 helly Exp $ */
+/* $Id: php_http.c,v 1.77.2.11.2.9 2007/05/10 21:05:14 iliaa Exp $ */
 
 #include php_soap.h
 #include ext/standard/base64.h
 #include ext/standard/md5.h
+#include ext/standard/php_rand.h
 
 static char *get_http_header_value(char *headers, char *type);
 static int get_http_body(php_stream *socketd, int close, char *headers,  char 
**response, int *out_size TSRMLS_DC);
@@ -469,10 +470,9 @@
char  HA1[33], HA2[33], 
response[33], cnonce[33], nc[9];
PHP_MD5_CTX   md5ctx;
unsigned char hash[16];
-   unsigned int ctx;
 
PHP_MD5Init(md5ctx);
-   snprintf(cnonce, sizeof(cnonce), %d, 
php_rand_r(ctx));
+   snprintf(cnonce, sizeof(cnonce), %d, 
php_rand(TSRMLS_C));
PHP_MD5Update(md5ctx, (unsigned 
char*)cnonce, strlen(cnonce));
PHP_MD5Final(hash, md5ctx);
make_digest(cnonce, hash);

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



[PHP-CVS] cvs: php-src /ext/soap php_http.c

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 21:26:52 2007 UTC

  Modified files:  
/php-src/ext/soap   php_http.c 
  Log:
  MFB
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.103r2=1.104diff_format=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.103 php-src/ext/soap/php_http.c:1.104
--- php-src/ext/soap/php_http.c:1.103   Sat Feb 24 16:25:55 2007
+++ php-src/ext/soap/php_http.c Thu May 10 21:26:51 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_http.c,v 1.103 2007/02/24 16:25:55 helly Exp $ */
+/* $Id: php_http.c,v 1.104 2007/05/10 21:26:51 tony2001 Exp $ */
 
 #include php_soap.h
 #include ext/standard/base64.h
@@ -465,10 +465,9 @@
char  HA1[33], HA2[33], 
response[33], cnonce[33], nc[9];
PHP_MD5_CTX   md5ctx;
unsigned char hash[16];
-   unsigned int ctx;
 
PHP_MD5Init(md5ctx);
-   snprintf(cnonce, sizeof(cnonce), %d, 
php_rand_r(ctx));
+   snprintf(cnonce, sizeof(cnonce), %ld, 
php_rand(TSRMLS_C);
PHP_MD5Update(md5ctx, (unsigned 
char*)cnonce, strlen(cnonce));
PHP_MD5Final(hash, md5ctx);
make_digest(cnonce, hash);

-- 
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) /ext/soap php_http.c

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 21:52:10 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/soap   php_http.c 
  Log:
  %d - %ld
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.77.2.11.2.9r2=1.77.2.11.2.10diff_format=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.77.2.11.2.9 
php-src/ext/soap/php_http.c:1.77.2.11.2.10
--- php-src/ext/soap/php_http.c:1.77.2.11.2.9   Thu May 10 21:05:14 2007
+++ php-src/ext/soap/php_http.c Thu May 10 21:52:10 2007
@@ -17,7 +17,7 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_http.c,v 1.77.2.11.2.9 2007/05/10 21:05:14 iliaa Exp $ */
+/* $Id: php_http.c,v 1.77.2.11.2.10 2007/05/10 21:52:10 tony2001 Exp $ */
 
 #include php_soap.h
 #include ext/standard/base64.h
@@ -472,7 +472,7 @@
unsigned char hash[16];
 
PHP_MD5Init(md5ctx);
-   snprintf(cnonce, sizeof(cnonce), %d, 
php_rand(TSRMLS_C));
+   snprintf(cnonce, sizeof(cnonce), %ld, 
php_rand(TSRMLS_C));
PHP_MD5Update(md5ctx, (unsigned 
char*)cnonce, strlen(cnonce));
PHP_MD5Final(hash, md5ctx);
make_digest(cnonce, hash);

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



[PHP-CVS] cvs: php-src /ext/soap php_http.c

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 21:54:08 2007 UTC

  Modified files:  
/php-src/ext/soap   php_http.c 
  Log:
  add missing header
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_http.c?r1=1.104r2=1.105diff_format=u
Index: php-src/ext/soap/php_http.c
diff -u php-src/ext/soap/php_http.c:1.104 php-src/ext/soap/php_http.c:1.105
--- php-src/ext/soap/php_http.c:1.104   Thu May 10 21:26:51 2007
+++ php-src/ext/soap/php_http.c Thu May 10 21:54:08 2007
@@ -17,11 +17,12 @@
   |  Dmitry Stogov [EMAIL PROTECTED] |
   +--+
 */
-/* $Id: php_http.c,v 1.104 2007/05/10 21:26:51 tony2001 Exp $ */
+/* $Id: php_http.c,v 1.105 2007/05/10 21:54:08 tony2001 Exp $ */
 
 #include php_soap.h
 #include ext/standard/base64.h
 #include ext/standard/md5.h
+#include ext/standard/php_rand.h
 
 static char *get_http_header_value(char *headers, char *type);
 static int get_http_body(php_stream *socketd, int close, char *headers,  char 
**response, int *out_size TSRMLS_DC);

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



[PHP-CVS] cvs: php-src /ext/standard string.c /ext/standard/tests/strings strripos_offset.phpt

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 22:08:36 2007 UTC

  Added files: 
/php-src/ext/standard/tests/strings strripos_offset.phpt 

  Modified files:  
/php-src/ext/standard   string.c 
  Log:
  fix segfault in strripos() when offset == INT_MAX+1
  identified and repoted by Joxean Koret
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.634r2=1.635diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.634 php-src/ext/standard/string.c:1.635
--- php-src/ext/standard/string.c:1.634 Sun Apr 22 19:22:19 2007
+++ php-src/ext/standard/string.c   Thu May 10 22:08:35 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.634 2007/04/22 19:22:19 tony2001 Exp $ */
+/* $Id: string.c,v 1.635 2007/05/10 22:08:35 tony2001 Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -2915,7 +2915,7 @@
u_e = haystack.u + haystack_len - needle_len;
} else {
u_p = haystack.u;
-   if (-offset  haystack_len) {
+   if (-offset  haystack_len || -offset  0) {
RETURN_FALSE;
} else {
cu_offset = haystack_len;
@@ -2953,7 +2953,7 @@
e = haystack.s + haystack_len - 1;
} else {
p = haystack.s;
-   if (-offset  haystack_len) {
+   if (-offset  haystack_len || -offset  0) {
RETURN_FALSE;
} else {
e = haystack.s + haystack_len + offset;
@@ -2984,7 +2984,7 @@
p = haystack_dup + offset;
e = haystack_dup + haystack_len - needle_len;
} else {
-   if (-offset  haystack_len) {
+   if (-offset  haystack_len || -offset  0) {
efree(haystack_dup);
efree(needle_dup);
RETURN_FALSE;

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strripos_offset.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strripos_offset.phpt
+++ php-src/ext/standard/tests/strings/strripos_offset.phpt
--TEST--
strripos() offset integer overflow
--FILE--
?php

var_dump(strripos(t, t, PHP_INT_MAX+1));
var_dump(strripos(, tt, PHP_INT_MAX+1));
var_dump(strripos(100, 101, PHP_INT_MAX+1));
var_dump(strripos(1024, 1024, PHP_INT_MAX+1));
var_dump(strripos(array(), array(), PHP_INT_MAX+1));
var_dump(strripos(1024, 1024, -PHP_INT_MAX));
var_dump(strripos(1024, te, -PHP_INT_MAX));
var_dump(strripos(1024, 1024, -PHP_INT_MAX-1));
var_dump(strripos(1024, te, -PHP_INT_MAX-1));

echo Done\n;
?
--EXPECTF-- 
bool(false)
bool(false)
bool(false)
bool(false)

Warning: strripos() expects parameter 1 to be string (Unicode or binary), array 
given in %s on line %d
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
Done
--UEXPECTF--
bool(false)
bool(false)
bool(false)
bool(false)

Warning: strripos() expects parameter 1 to be string (Unicode or binary), array 
given in %s on line %d
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
Done

-- 
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 string.c /ext/standard/tests/strings strripos_offset.phpt

2007-05-10 Thread Antony Dovgal
tony2001Thu May 10 22:10:44 2007 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/strings strripos_offset.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/standard   string.c 
  Log:
  MFH: fix segfault in strripos() when offset == INT_MAX+1
  identified and repoted by Joxean Koret
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.694r2=1.2027.2.547.2.695diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.694 php-src/NEWS:1.2027.2.547.2.695
--- php-src/NEWS:1.2027.2.547.2.694 Thu May 10 15:21:02 2007
+++ php-src/NEWSThu May 10 22:10:43 2007
@@ -7,6 +7,7 @@
   (Ilia)
 - Fixed altering $this via argument named this. (Dmitry)
 - Fixed PHP CLI to use the php.ini from the binary location. (Hannes)
+- Fixed segfault in strripos(). (Tony, Joxean Koret)
 - Fixed bug #41347 (checkdnsrr() segfaults on empty hostname). (Scott)
 - Fixed bug #41337 (WSDL parsing doesn't ignore non soap bindings). (Dmitry)
 - Fixed bug #41326 (Writing empty tags with Xmlwriter::WriteElement[ns])
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.54r2=1.445.2.14.2.55diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.54 
php-src/ext/standard/string.c:1.445.2.14.2.55
--- php-src/ext/standard/string.c:1.445.2.14.2.54   Mon Mar 26 10:25:41 2007
+++ php-src/ext/standard/string.c   Thu May 10 22:10:43 2007
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: string.c,v 1.445.2.14.2.54 2007/03/26 10:25:41 tony2001 Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.55 2007/05/10 22:10:43 tony2001 Exp $ */
 
 /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
 
@@ -1856,7 +1856,7 @@
e = haystack + haystack_len - 1;
} else {
p = haystack;
-   if (-offset  haystack_len) {
+   if (-offset  haystack_len || -offset  0) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, 
Offset is greater than the length of haystack string);
RETURN_FALSE;
} else {
@@ -1889,7 +1889,7 @@
p = haystack_dup + offset;
e = haystack_dup + haystack_len - needle_len;
} else {
-   if (-offset  haystack_len) {
+   if (-offset  haystack_len || -offset  0) {
efree(needle_dup);
efree(haystack_dup);
php_error_docref(NULL TSRMLS_CC, E_NOTICE, Offset is 
greater than the length of haystack string);

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/strings/strripos_offset.phpt?view=markuprev=1.1
Index: php-src/ext/standard/tests/strings/strripos_offset.phpt
+++ php-src/ext/standard/tests/strings/strripos_offset.phpt
--TEST--
strripos() offset integer overflow
--FILE--
?php

var_dump(strripos(t, t, PHP_INT_MAX+1));
var_dump(strripos(, tt, PHP_INT_MAX+1));
var_dump(strripos(100, 101, PHP_INT_MAX+1));
var_dump(strripos(1024, 1024, PHP_INT_MAX+1));
var_dump(strripos(array(), array(), PHP_INT_MAX+1));
var_dump(strripos(1024, 1024, -PHP_INT_MAX));
var_dump(strripos(1024, te, -PHP_INT_MAX));
var_dump(strripos(1024, 1024, -PHP_INT_MAX-1));
var_dump(strripos(1024, te, -PHP_INT_MAX-1));

echo Done\n;
?
--EXPECTF-- 
bool(false)
bool(false)
bool(false)
bool(false)

Warning: strripos() expects parameter 1 to be string (Unicode or binary), array 
given in %s on line %d
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
Done
--UEXPECTF--
bool(false)
bool(false)
bool(false)
bool(false)

Warning: strripos() expects parameter 1 to be string (Unicode or binary), array 
given in %s on line %d
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
Done

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



[PHP-CVS] cvs: php-src /ext/spl spl_iterators.c spl_iterators.h

2007-05-10 Thread Marcus Boerger
helly   Fri May 11 00:14:37 2007 UTC

  Modified files:  
/php-src/ext/splspl_iterators.c spl_iterators.h 
  Log:
  -Addvert optionto RegexIterator
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.160r2=1.161diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.160 
php-src/ext/spl/spl_iterators.c:1.161
--- php-src/ext/spl/spl_iterators.c:1.160   Sun Mar  4 12:06:55 2007
+++ php-src/ext/spl/spl_iterators.c Fri May 11 00:14:36 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_iterators.c,v 1.160 2007/03/04 12:06:55 helly Exp $ */
+/* $Id: spl_iterators.c,v 1.161 2007/05/11 00:14:36 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -1453,6 +1453,10 @@
}
}
 
+   if (intern-u.regex.flags  REGIT_INVERTED) {
+   RETVAL_BOOL(Z_LVAL_P(return_value));
+   }
+
if (use_copy) {
efree(subject);
}
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.h?r1=1.41r2=1.42diff_format=u
Index: php-src/ext/spl/spl_iterators.h
diff -u php-src/ext/spl/spl_iterators.h:1.41 
php-src/ext/spl/spl_iterators.h:1.42
--- php-src/ext/spl/spl_iterators.h:1.41Thu Feb  8 20:13:49 2007
+++ php-src/ext/spl/spl_iterators.h Fri May 11 00:14:36 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_iterators.h,v 1.41 2007/02/08 20:13:49 helly Exp $ */
+/* $Id: spl_iterators.h,v 1.42 2007/05/11 00:14:36 helly Exp $ */
 
 #ifndef SPL_ITERATORS_H
 #define SPL_ITERATORS_H
@@ -94,6 +94,7 @@
 enum {
/* public */
REGIT_USE_KEY= 0x0001,
+   REGIT_INVERTED   = 0x0002,
 };
 
 typedef enum {

-- 
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) /ext/spl spl_iterators.c spl_iterators.h

2007-05-10 Thread Marcus Boerger
helly   Fri May 11 00:15:25 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/splspl_iterators.c spl_iterators.h 
  Log:
   - MFH Add invert option to RegexIterator
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.c?r1=1.73.2.30.2.27r2=1.73.2.30.2.28diff_format=u
Index: php-src/ext/spl/spl_iterators.c
diff -u php-src/ext/spl/spl_iterators.c:1.73.2.30.2.27 
php-src/ext/spl/spl_iterators.c:1.73.2.30.2.28
--- php-src/ext/spl/spl_iterators.c:1.73.2.30.2.27  Sun Mar  4 14:01:06 2007
+++ php-src/ext/spl/spl_iterators.c Fri May 11 00:15:25 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_iterators.c,v 1.73.2.30.2.27 2007/03/04 14:01:06 helly Exp $ */
+/* $Id: spl_iterators.c,v 1.73.2.30.2.28 2007/05/11 00:15:25 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -1426,6 +1426,10 @@
}
}
 
+   if (intern-u.regex.flags  REGIT_INVERTED) {
+   RETVAL_BOOL(Z_LVAL_P(return_value));
+   }
+
if (use_copy) {
efree(subject);
}
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_iterators.h?r1=1.18.2.7.2.11r2=1.18.2.7.2.12diff_format=u
Index: php-src/ext/spl/spl_iterators.h
diff -u php-src/ext/spl/spl_iterators.h:1.18.2.7.2.11 
php-src/ext/spl/spl_iterators.h:1.18.2.7.2.12
--- php-src/ext/spl/spl_iterators.h:1.18.2.7.2.11   Thu Feb  8 22:17:40 2007
+++ php-src/ext/spl/spl_iterators.h Fri May 11 00:15:25 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_iterators.h,v 1.18.2.7.2.11 2007/02/08 22:17:40 helly Exp $ */
+/* $Id: spl_iterators.h,v 1.18.2.7.2.12 2007/05/11 00:15:25 helly Exp $ */
 
 #ifndef SPL_ITERATORS_H
 #define SPL_ITERATORS_H
@@ -94,6 +94,7 @@
 enum {
/* public */
REGIT_USE_KEY= 0x0001,
+   REGIT_INVERTED   = 0x0002,
 };
 
 typedef enum {

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