[PHP-CVS] cvs: php-src /ext/standard url_scanner_ex.c /ext/standard/tests/general_functions bug44394.phpt bug44394_2.phpt

2008-03-11 Thread Felipe Pena
felipe  Wed Mar 12 02:45:15 2008 UTC

  Modified files:  
/php-src/ext/standard   url_scanner_ex.c 
/php-src/ext/standard/tests/general_functions   bug44394.phpt 
bug44394_2.phpt 
  Log:
  MFB: Fixed bug #44394 (Last two bytes missing from output)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/url_scanner_ex.c?r1=1.108&r2=1.109&diff_format=u
Index: php-src/ext/standard/url_scanner_ex.c
diff -u php-src/ext/standard/url_scanner_ex.c:1.108 
php-src/ext/standard/url_scanner_ex.c:1.109
--- php-src/ext/standard/url_scanner_ex.c:1.108 Wed Oct 10 09:28:25 2007
+++ php-src/ext/standard/url_scanner_ex.c   Wed Mar 12 02:45:15 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: url_scanner_ex.c,v 1.108 2007/10/10 09:28:25 jani Exp $ */
+/* $Id: url_scanner_ex.c,v 1.109 2008/03/12 02:45:15 felipe Exp $ */
 
 #include "php.h"
 
@@ -1007,7 +1007,7 @@
size_t len;
 
if (BG(url_adapt_state_ex).url_app.len != 0) {
-   *handled_output = url_adapt_ext(output, output_len, &len, 
(zend_bool) (mode & PHP_OUTPUT_HANDLER_END ? 1 : 0) TSRMLS_CC);
+   *handled_output = url_adapt_ext(output, output_len, &len, 
(zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT) ? 1 : 0) 
TSRMLS_CC);
if (sizeof(uint) < sizeof(size_t)) {
if (len > UINT_MAX)
len = UINT_MAX;
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug44394.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug44394.phpt
diff -u /dev/null php-src/ext/standard/tests/general_functions/bug44394.phpt:1.2
--- /dev/null   Wed Mar 12 02:45:15 2008
+++ php-src/ext/standard/tests/general_functions/bug44394.phpt  Wed Mar 12 
02:45:15 2008
@@ -0,0 +1,18 @@
+--TEST--
+Bug #44394 Last two bytes missing from output
+--FILE--
+asd";
+
+output_add_rewrite_var('a', 'b');
+
+echo $string;
+
+ob_flush();
+
+ob_end_clean();
+
+?>
+--EXPECT--
+asd
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug44394_2.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug44394_2.phpt
diff -u /dev/null 
php-src/ext/standard/tests/general_functions/bug44394_2.phpt:1.2
--- /dev/null   Wed Mar 12 02:45:15 2008
+++ php-src/ext/standard/tests/general_functions/bug44394_2.phptWed Mar 
12 02:45:15 2008
@@ -0,0 +1,24 @@
+--TEST--
+Bug #44394 (Last two bytes missing from output) with session.use_trans_id
+--FILE--
+asd";
+
+output_add_rewrite_var('a', 'b');
+
+echo $string;
+
+ob_flush();
+
+ob_end_clean();
+
+?>
+--EXPECTF--
+asd



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



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard url_scanner_ex.c /ext/standard/tests/general_functions bug44394.phpt bug44394_2.phpt

2008-03-11 Thread Felipe Pena
felipe  Wed Mar 12 02:40:57 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/general_functions   bug44394.phpt 
bug44394_2.phpt 

  Modified files:  
/php-srcNEWS 
/php-src/ext/standard   url_scanner_ex.c 
  Log:
  Fixed bug #44394 (Last two bytes missing from output)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.134&r2=1.2027.2.547.2.965.2.135&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.134 
php-src/NEWS:1.2027.2.547.2.965.2.135
--- php-src/NEWS:1.2027.2.547.2.965.2.134   Mon Mar 10 11:19:24 2008
+++ php-src/NEWSWed Mar 12 02:40:56 2008
@@ -126,6 +126,7 @@
 - Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf)
 - Fixed PECL bug #12431 (OCI8 ping functionality is broken). (Oracle Corp.)
 
+- Fixed bug #44394 (Last two bytes missing from output). (Felipe)
 - Fixed bug #44336 (Improve pcre UTF-8 string matching performance).
   (frode at coretrek dot com, Nuno)
 - Fixed bug #44214 (Crash using preg_replace_callback() and global variable).
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/url_scanner_ex.c?r1=1.95.2.4.2.3.2.2&r2=1.95.2.4.2.3.2.3&diff_format=u
Index: php-src/ext/standard/url_scanner_ex.c
diff -u php-src/ext/standard/url_scanner_ex.c:1.95.2.4.2.3.2.2 
php-src/ext/standard/url_scanner_ex.c:1.95.2.4.2.3.2.3
--- php-src/ext/standard/url_scanner_ex.c:1.95.2.4.2.3.2.2  Wed Oct 10 
09:27:13 2007
+++ php-src/ext/standard/url_scanner_ex.c   Wed Mar 12 02:40:57 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: url_scanner_ex.c,v 1.95.2.4.2.3.2.2 2007/10/10 09:27:13 jani Exp $ */
+/* $Id: url_scanner_ex.c,v 1.95.2.4.2.3.2.3 2008/03/12 02:40:57 felipe Exp $ */
 
 #include "php.h"
 
@@ -1007,7 +1007,7 @@
size_t len;
 
if (BG(url_adapt_state_ex).url_app.len != 0) {
-   *handled_output = url_adapt_ext(output, output_len, &len, 
(zend_bool) (mode & PHP_OUTPUT_HANDLER_END ? 1 : 0) TSRMLS_CC);
+   *handled_output = url_adapt_ext(output, output_len, &len, 
(zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT) ? 1 : 0) 
TSRMLS_CC);
if (sizeof(uint) < sizeof(size_t)) {
if (len > UINT_MAX)
len = UINT_MAX;

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug44394.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/general_functions/bug44394.phpt
+++ php-src/ext/standard/tests/general_functions/bug44394.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug44394_2.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/general_functions/bug44394_2.phpt
+++ php-src/ext/standard/tests/general_functions/bug44394_2.phpt



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



[PHP-CVS] cvs: php-src /sapi/apache2handler config.m4

2008-03-11 Thread Lars Strojny
lstrojnyTue Mar 11 22:50:41 2008 UTC

  Modified files:  
/php-src/sapi/apache2handlerconfig.m4 
  Log:
  Adding itk again to non-threaded MPMs. Sorry for the confusion
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2handler/config.m4?r1=1.20&r2=1.21&diff_format=u
Index: php-src/sapi/apache2handler/config.m4
diff -u php-src/sapi/apache2handler/config.m4:1.20 
php-src/sapi/apache2handler/config.m4:1.21
--- php-src/sapi/apache2handler/config.m4:1.20  Sun Mar  9 12:37:05 2008
+++ php-src/sapi/apache2handler/config.m4   Tue Mar 11 22:50:41 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.20 2008/03/09 12:37:05 lstrojny Exp $
+dnl $Id: config.m4,v 1.21 2008/03/11 22:50:41 lstrojny Exp $
 dnl
 
 PHP_ARG_WITH(apxs2,,
@@ -117,7 +117,7 @@
 ;;
   esac
 
-  if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser"; then
+  if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test 
"$APXS_MPM" != "itk"; then
 PHP_BUILD_THREAD_SAFE
   fi
   AC_MSG_RESULT(yes)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /sapi/apache2filter config.m4 /sapi/apache2handler config.m4

2008-03-11 Thread Lars Strojny
lstrojnyTue Mar 11 22:47:40 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/sapi/apache2filter config.m4 
/php-src/sapi/apache2handlerconfig.m4 
  Log:
  Adding itk again to non-threaded MPMs. Sorry for the confusion
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2filter/config.m4?r1=1.47&r2=1.48&diff_format=u
Index: php-src/sapi/apache2filter/config.m4
diff -u php-src/sapi/apache2filter/config.m4:1.47 
php-src/sapi/apache2filter/config.m4:1.48
--- php-src/sapi/apache2filter/config.m4:1.47   Sun Mar  9 12:37:05 2008
+++ php-src/sapi/apache2filter/config.m4Tue Mar 11 22:47:39 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.47 2008/03/09 12:37:05 lstrojny Exp $
+dnl $Id: config.m4,v 1.48 2008/03/11 22:47:39 lstrojny Exp $
 dnl
 
 PHP_ARG_WITH(apxs2filter,,
@@ -118,7 +118,7 @@
 ;;
   esac
 
-  if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser"; then
+  if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test 
"$APXS_MPM" != "itk"; then
 PHP_BUILD_THREAD_SAFE
   fi
   AC_MSG_RESULT(yes)
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache2handler/config.m4?r1=1.14.2.1.2.2.2.2&r2=1.14.2.1.2.2.2.3&diff_format=u
Index: php-src/sapi/apache2handler/config.m4
diff -u php-src/sapi/apache2handler/config.m4:1.14.2.1.2.2.2.2 
php-src/sapi/apache2handler/config.m4:1.14.2.1.2.2.2.3
--- php-src/sapi/apache2handler/config.m4:1.14.2.1.2.2.2.2  Sun Mar  9 
12:35:56 2008
+++ php-src/sapi/apache2handler/config.m4   Tue Mar 11 22:47:39 2008
@@ -1,5 +1,5 @@
 dnl
-dnl $Id: config.m4,v 1.14.2.1.2.2.2.2 2008/03/09 12:35:56 lstrojny Exp $
+dnl $Id: config.m4,v 1.14.2.1.2.2.2.3 2008/03/11 22:47:39 lstrojny Exp $
 dnl
 
 PHP_ARG_WITH(apxs2,,
@@ -117,7 +117,7 @@
 ;;
   esac
 
-  if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser"; then
+  if test "$APXS_MPM" != "prefork" && test "$APXS_MPM" != "peruser" && test 
"$APXS_MPM" != "itk"; then
 PHP_BUILD_THREAD_SAFE
   fi
   AC_MSG_RESULT(yes)



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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-03-11 Thread Stanislav Malyshev

Dmitry,
Do we need this in 5.2?


I think we do, looks low-risk to me.



Nope; this commit fixed a bug with my patch to 5.3/HEAD. It wasn't 
backported to 5.2 in the first place.


Ah, my bad, I thought it was in 5.2 too :)
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-03-11 Thread Gwynne Raskind

On Mar 11, 2008, at 3:50 PM, Stanislav Malyshev wrote:

Dmitry,
Do we need this in 5.2?


I think we do, looks low-risk to me.



Nope; this commit fixed a bug with my patch to 5.3/HEAD. It wasn't  
backported to 5.2 in the first place.


-- Gwynne, Daughter of the Code
"This whole world is an asylum for the incurable."




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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-03-11 Thread Stanislav Malyshev

Dmitry,

Do we need this in 5.2?


I think we do, looks low-risk to me.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

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



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-03-11 Thread Ilia Alshanetsky

Dmitry,

Do we need this in 5.2?


On 11-Mar-08, at 5:36 AM, Dmitry Stogov wrote:


dmitry  Tue Mar 11 09:36:41 2008 UTC

 Modified files:  (Branch: PHP_5_3)
   /php-src/ext/session session.c
 Log:
 Fixed memory corruption because of double free()


http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.40.2.5&r2=1.417.2.8.2.40.2.6&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.40.2.5 php-src/ext/ 
session/session.c:1.417.2.8.2.40.2.6
--- php-src/ext/session/session.c:1.417.2.8.2.40.2.5	Mon Mar 10  
22:12:35 2008

+++ php-src/ext/session/session.c   Tue Mar 11 09:36:41 2008
@@ -17,7 +17,7 @@

+ 
--+

 */

-/* $Id: session.c,v 1.417.2.8.2.40.2.5 2008/03/10 22:12:35 felipe  
Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.40.2.6 2008/03/11 09:36:41 dmitry  
Exp $ */


#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1943,6 +1943,7 @@
for (i = 0; i < 6; i++) {
if (PS(mod_user_names).names[i] != NULL) {
zval_ptr_dtor(&PS(mod_user_names).names[i]);
+   PS(mod_user_names).names[i] = NULL;
}
}




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



Ilia Alshanetsky





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



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

2008-03-11 Thread Andrey Hristov
Antony Dovgal wrote:
> tony2001  Tue Mar 11 10:26:51 2008 UTC
> 
>   Modified files:  
> /php-src/main network.c 
>   Log:
>   fix segfault - error_string may be NULL, in this case we have to follow the 
> old behavior
>   
>   

Opps, *shame* :)

-- 
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) /main network.c

2008-03-11 Thread Antony Dovgal
tony2001Tue Mar 11 10:27:23 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/main   network.c 
  Log:
  MFH: fix segfault - error_string may be NULL, in this case we have to follow 
the old behavior
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.8&r2=1.118.2.2.2.9&diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.8 
php-src/main/network.c:1.118.2.2.2.9
--- php-src/main/network.c:1.118.2.2.2.8Mon Mar 10 20:09:22 2008
+++ php-src/main/network.c  Tue Mar 11 10:27:23 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.8 2008/03/10 20:09:22 andrey Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.9 2008/03/11 10:27:23 tony2001 Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -200,12 +200,20 @@
 # endif

if ((n = getaddrinfo(host, NULL, &hints, &res))) {
-   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"php_network_getaddresses: getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
+   }
return 0;
} else if (res == NULL) {
-   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed (null result pointer) errno=%d", errno);
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed (null result pointer) errno=%d", errno);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"php_network_getaddresses: getaddrinfo failed (null result pointer)");
+   }
return 0;
}
 
@@ -229,8 +237,12 @@
/* XXX NOT THREAD SAFE (is safe under win32) */
host_info = gethostbyname(host);
if (host_info == NULL) {
-   spprintf(error_string, 0, "php_network_getaddresses: 
gethostbyname failed. errno=%d", errno);
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, 
"php_network_getaddresses: gethostbyname failed. errno=%d", errno);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"%s", *error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"php_network_getaddresses: gethostbyname failed");
+   }
return 0;
}
in = *((struct in_addr *) host_info->h_addr);



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



[PHP-CVS] cvs: php-src(PHP_5_3) /main network.c

2008-03-11 Thread Antony Dovgal
tony2001Tue Mar 11 10:27:10 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/main   network.c 
  Log:
  MFH: fix segfault - error_string may be NULL, in this case we have to follow 
the old behavior
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.5&r2=1.118.2.2.2.6.2.6&diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.5 
php-src/main/network.c:1.118.2.2.2.6.2.6
--- php-src/main/network.c:1.118.2.2.2.6.2.5Mon Mar 10 19:54:47 2008
+++ php-src/main/network.c  Tue Mar 11 10:27:10 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.5 2008/03/10 19:54:47 andrey Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.6 2008/03/11 10:27:10 tony2001 Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -205,12 +205,20 @@
 # endif

if ((n = getaddrinfo(host, NULL, &hints, &res))) {
-   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"php_network_getaddresses: getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
+   }
return 0;
} else if (res == NULL) {
-   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed (null result pointer) errno=%d", errno);
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed (null result pointer) errno=%d", errno);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"php_network_getaddresses: getaddrinfo failed (null result pointer)");
+   }
return 0;
}
 
@@ -234,8 +242,12 @@
/* XXX NOT THREAD SAFE (is safe under win32) */
host_info = gethostbyname(host);
if (host_info == NULL) {
-   spprintf(error_string, 0, "php_network_getaddresses: 
gethostbyname failed. errno=%d", errno);
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, 
"php_network_getaddresses: gethostbyname failed. errno=%d", errno);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"%s", *error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"php_network_getaddresses: gethostbyname failed");
+   }
return 0;
}
in = *((struct in_addr *) host_info->h_addr);



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



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

2008-03-11 Thread Antony Dovgal
tony2001Tue Mar 11 10:26:51 2008 UTC

  Modified files:  
/php-src/main   network.c 
  Log:
  fix segfault - error_string may be NULL, in this case we have to follow the 
old behavior
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.132&r2=1.133&diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.132 php-src/main/network.c:1.133
--- php-src/main/network.c:1.132Mon Mar 10 19:55:43 2008
+++ php-src/main/network.c  Tue Mar 11 10:26:51 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: network.c,v 1.132 2008/03/10 19:55:43 andrey Exp $ */
+/* $Id: network.c,v 1.133 2008/03/11 10:26:51 tony2001 Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -205,12 +205,20 @@
 # endif

if ((n = getaddrinfo(host, NULL, &hints, &res))) {
-   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"php_network_getaddresses: getaddrinfo failed: %s", PHP_GAI_STRERROR(n));
+   }
return 0;
} else if (res == NULL) {
-   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed (null result pointer) errno=%d", errno);
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, "php_network_getaddresses: 
getaddrinfo failed (null result pointer) errno=%d", errno);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"php_network_getaddresses: getaddrinfo failed (null result pointer)");
+   }
return 0;
}
 
@@ -234,8 +242,12 @@
/* XXX NOT THREAD SAFE (is safe under win32) */
host_info = gethostbyname(host);
if (host_info == NULL) {
-   spprintf(error_string, 0, "php_network_getaddresses: 
gethostbyname failed. errno=%d", errno);
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", 
*error_string);
+   if (error_string) {
+   spprintf(error_string, 0, 
"php_network_getaddresses: gethostbyname failed. errno=%d", errno);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"%s", *error_string);
+   } else {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"php_network_getaddresses: gethostbyname failed");
+   }
return 0;
}
in = *((struct in_addr *) host_info->h_addr);



-- 
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/dir closedir_variation3.phpt rewinddir_variation3.phpt

2008-03-11 Thread Josie Messa
jmessa  Tue Mar 11 10:20:06 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/dir rewinddir_variation3.phpt 
closedir_variation3.phpt 
  Log:
  - Added extra whitespace around error messages in expected output
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/rewinddir_variation3.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/dir/rewinddir_variation3.phpt
diff -u php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.2 
php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.3
--- php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.2Fri Mar 
 7 16:21:30 2008
+++ php-src/ext/standard/tests/dir/rewinddir_variation3.phptTue Mar 11 
10:20:06 2008
@@ -34,7 +34,9 @@
 
 -- Open a file using fopen --
 resource(%d) of type (stream)
-NULL
+
+Warning: rewinddir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
 
 -- Check if rewinddir() has repositioned the file pointer --
 rewinddir() does not work on file pointers
@@ -44,7 +46,9 @@
 
 -- Open a file using fopen --
 resource(%d) of type (stream)
-NULL
+
+Warning: rewinddir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
 
 -- Check if rewinddir() has repositioned the file pointer --
 rewinddir() does not work on file pointers
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/closedir_variation3.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/dir/closedir_variation3.phpt
diff -u php-src/ext/standard/tests/dir/closedir_variation3.phpt:1.2 
php-src/ext/standard/tests/dir/closedir_variation3.phpt:1.3
--- php-src/ext/standard/tests/dir/closedir_variation3.phpt:1.2 Fri Mar  7 
16:21:30 2008
+++ php-src/ext/standard/tests/dir/closedir_variation3.phpt Tue Mar 11 
10:20:06 2008
@@ -35,7 +35,9 @@
 resource(%d) of type (stream)
 
 -- Try to close the file pointer using closedir() --
+
 Warning: closedir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
 
 -- Check file pointer: --
 resource(%d) of type (stream)
@@ -47,7 +49,9 @@
 resource(%d) of type (stream)
 
 -- Try to close the file pointer using closedir() --
+
 Warning: closedir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
 
 -- Check file pointer: --
 resource(%d) of type (stream)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/dir rewinddir_variation3.phpt

2008-03-11 Thread Josie Messa
jmessa  Tue Mar 11 10:17:51 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/dir rewinddir_variation3.phpt 
  Log:
  - Fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/rewinddir_variation3.phpt?r1=1.1.4.3&r2=1.1.4.4&diff_format=u
Index: php-src/ext/standard/tests/dir/rewinddir_variation3.phpt
diff -u php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.4.3 
php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.4.4
--- php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.4.3Tue Mar 
11 10:00:26 2008
+++ php-src/ext/standard/tests/dir/rewinddir_variation3.phptTue Mar 11 
10:17:51 2008
@@ -36,6 +36,7 @@
 resource(%d) of type (stream)
 
 Warning: rewinddir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
 
 -- Check if rewinddir() has repositioned the file pointer --
 rewinddir() does not work on file pointers



-- 
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/tests/dir rewinddir_variation3.phpt

2008-03-11 Thread Josie Messa
jmessa  Tue Mar 11 10:15:18 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/dir rewinddir_variation3.phpt 
  Log:
  - Replace with previous commit
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/rewinddir_variation3.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u
Index: php-src/ext/standard/tests/dir/rewinddir_variation3.phpt
diff -u php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.2.3 
php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.2.4
--- php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.2.3Tue Mar 
11 10:01:31 2008
+++ php-src/ext/standard/tests/dir/rewinddir_variation3.phptTue Mar 11 
10:15:18 2008
@@ -36,6 +36,7 @@
 resource(%d) of type (stream)
 
 Warning: rewinddir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
 
 -- Check if rewinddir() has repositioned the file pointer --
 rewinddir() does not work on file pointers



-- 
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/tests/dir rewinddir_variation3.phpt

2008-03-11 Thread Josie Messa
jmessa  Tue Mar 11 10:01:31 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/dir rewinddir_variation3.phpt 
  Log:
  - Fix test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/rewinddir_variation3.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/dir/rewinddir_variation3.phpt
diff -u php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.2.2 
php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.2.3
--- php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.2.2Tue Mar 
11 09:45:30 2008
+++ php-src/ext/standard/tests/dir/rewinddir_variation3.phptTue Mar 11 
10:01:31 2008
@@ -36,7 +36,6 @@
 resource(%d) of type (stream)
 
 Warning: rewinddir(): %d is not a valid Directory resource in %s on line %d
-bool(false)
 
 -- Check if rewinddir() has repositioned the file pointer --
 rewinddir() does not work on file pointers



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/dir closedir_variation3.phpt rewinddir_variation3.phpt

2008-03-11 Thread Josie Messa
jmessa  Tue Mar 11 10:00:26 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/dir rewinddir_variation3.phpt 
closedir_variation3.phpt 
  Log:
  - Added extra whitespace around error messages in expected output
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/rewinddir_variation3.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u
Index: php-src/ext/standard/tests/dir/rewinddir_variation3.phpt
diff -u php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.4.2 
php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.4.3
--- php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.4.2Fri Mar 
 7 16:20:16 2008
+++ php-src/ext/standard/tests/dir/rewinddir_variation3.phptTue Mar 11 
10:00:26 2008
@@ -34,7 +34,8 @@
 
 -- Open a file using fopen --
 resource(%d) of type (stream)
-NULL
+
+Warning: rewinddir(): %d is not a valid Directory resource in %s on line %d
 
 -- Check if rewinddir() has repositioned the file pointer --
 rewinddir() does not work on file pointers
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/closedir_variation3.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u
Index: php-src/ext/standard/tests/dir/closedir_variation3.phpt
diff -u php-src/ext/standard/tests/dir/closedir_variation3.phpt:1.1.4.2 
php-src/ext/standard/tests/dir/closedir_variation3.phpt:1.1.4.3
--- php-src/ext/standard/tests/dir/closedir_variation3.phpt:1.1.4.2 Fri Mar 
 7 16:20:16 2008
+++ php-src/ext/standard/tests/dir/closedir_variation3.phpt Tue Mar 11 
10:00:26 2008
@@ -35,7 +35,9 @@
 resource(%d) of type (stream)
 
 -- Try to close the file pointer using closedir() --
+
 Warning: closedir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
 
 -- Check file pointer: --
 resource(%d) of type (stream)



-- 
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/tests/dir closedir_error.phpt readdir_variation7.phpt

2008-03-11 Thread Josie Messa
jmessa  Tue Mar 11 09:55:26 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/dir readdir_variation7.phpt 
closedir_error.phpt 
  Log:
  - Modified tests
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/readdir_variation7.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/dir/readdir_variation7.phpt
diff -u php-src/ext/standard/tests/dir/readdir_variation7.phpt:1.1.2.2 
php-src/ext/standard/tests/dir/readdir_variation7.phpt:1.1.2.3
--- php-src/ext/standard/tests/dir/readdir_variation7.phpt:1.1.2.2  Tue Mar 
11 09:45:30 2008
+++ php-src/ext/standard/tests/dir/readdir_variation7.phpt  Tue Mar 11 
09:55:26 2008
@@ -31,7 +31,6 @@
 *** Testing readdir() : usage variations ***
 resource(%d) of type (stream)
 
-
 Warning: readdir(): %d is not a valid Directory resource in %s on line %d
 bool(false)
 ===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/closedir_error.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/standard/tests/dir/closedir_error.phpt
diff -u php-src/ext/standard/tests/dir/closedir_error.phpt:1.1.2.1 
php-src/ext/standard/tests/dir/closedir_error.phpt:1.1.2.2
--- php-src/ext/standard/tests/dir/closedir_error.phpt:1.1.2.1  Fri Mar  7 
15:58:38 2008
+++ php-src/ext/standard/tests/dir/closedir_error.phpt  Tue Mar 11 09:55:26 2008
@@ -25,7 +25,7 @@
 $extra_arg = 10;
 var_dump( closedir($dir_handle, $extra_arg) );
 
-//successfully close the directory handle so can delete in --CLEAN-- section
+//successfully close the directory handle so can delete in CLEAN section
 closedir($dir_handle);
 ?>
 ===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) /ext/standard/tests/dir closedir_variation3.phpt readdir_variation7.phpt rewinddir_variation3.phpt

2008-03-11 Thread Josie Messa
jmessa  Tue Mar 11 09:45:31 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard/tests/dir readdir_variation7.phpt 
closedir_variation3.phpt 
rewinddir_variation3.phpt 
  Log:
  - Added extra whitespace around error messages in expected output
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/readdir_variation7.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/standard/tests/dir/readdir_variation7.phpt
diff -u php-src/ext/standard/tests/dir/readdir_variation7.phpt:1.1.2.1 
php-src/ext/standard/tests/dir/readdir_variation7.phpt:1.1.2.2
--- php-src/ext/standard/tests/dir/readdir_variation7.phpt:1.1.2.1  Fri Mar 
 7 16:19:39 2008
+++ php-src/ext/standard/tests/dir/readdir_variation7.phpt  Tue Mar 11 
09:45:30 2008
@@ -31,6 +31,7 @@
 *** Testing readdir() : usage variations ***
 resource(%d) of type (stream)
 
+
 Warning: readdir(): %d is not a valid Directory resource in %s on line %d
 bool(false)
 ===DONE===
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/closedir_variation3.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/standard/tests/dir/closedir_variation3.phpt
diff -u php-src/ext/standard/tests/dir/closedir_variation3.phpt:1.1.2.1 
php-src/ext/standard/tests/dir/closedir_variation3.phpt:1.1.2.2
--- php-src/ext/standard/tests/dir/closedir_variation3.phpt:1.1.2.1 Fri Mar 
 7 16:19:39 2008
+++ php-src/ext/standard/tests/dir/closedir_variation3.phpt Tue Mar 11 
09:45:30 2008
@@ -35,7 +35,9 @@
 resource(%d) of type (stream)
 
 -- Try to close the file pointer using closedir() --
+
 Warning: closedir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
 
 -- Check file pointer: --
 resource(%d) of type (stream)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/dir/rewinddir_variation3.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u
Index: php-src/ext/standard/tests/dir/rewinddir_variation3.phpt
diff -u php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.2.1 
php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.2.2
--- php-src/ext/standard/tests/dir/rewinddir_variation3.phpt:1.1.2.1Fri Mar 
 7 16:19:39 2008
+++ php-src/ext/standard/tests/dir/rewinddir_variation3.phptTue Mar 11 
09:45:30 2008
@@ -34,7 +34,9 @@
 
 -- Open a file using fopen --
 resource(%d) of type (stream)
-NULL
+
+Warning: rewinddir(): %d is not a valid Directory resource in %s on line %d
+bool(false)
 
 -- Check if rewinddir() has repositioned the file pointer --
 rewinddir() does not work on file pointers



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



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

2008-03-11 Thread Dmitry Stogov
dmitry  Tue Mar 11 09:36:52 2008 UTC

  Modified files:  
/php-src/ext/sessionsession.c 
  Log:
  Fixed memory corruption because of double free()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.481&r2=1.482&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.481 php-src/ext/session/session.c:1.482
--- php-src/ext/session/session.c:1.481 Fri Mar  7 23:20:15 2008
+++ php-src/ext/session/session.c   Tue Mar 11 09:36:51 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.481 2008/03/07 23:20:15 gwynne Exp $ */
+/* $Id: session.c,v 1.482 2008/03/11 09:36:51 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1838,6 +1838,7 @@
for (i = 0; i < 6; i++) {
if (PS(mod_user_names).names[i] != NULL) {
zval_ptr_dtor(&PS(mod_user_names).names[i]);
+   PS(mod_user_names).names[i] = NULL;
}
}
 



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-03-11 Thread Dmitry Stogov
dmitry  Tue Mar 11 09:36:41 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sessionsession.c 
  Log:
  Fixed memory corruption because of double free()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.40.2.5&r2=1.417.2.8.2.40.2.6&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.40.2.5 
php-src/ext/session/session.c:1.417.2.8.2.40.2.6
--- php-src/ext/session/session.c:1.417.2.8.2.40.2.5Mon Mar 10 22:12:35 2008
+++ php-src/ext/session/session.c   Tue Mar 11 09:36:41 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.40.2.5 2008/03/10 22:12:35 felipe Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.40.2.6 2008/03/11 09:36:41 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1943,6 +1943,7 @@
for (i = 0; i < 6; i++) {
if (PS(mod_user_names).names[i] != NULL) {
zval_ptr_dtor(&PS(mod_user_names).names[i]);
+   PS(mod_user_names).names[i] = NULL;
}
}
 



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