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

2009-04-19 Thread Ilia Alshanetsky
iliaa   Sun Apr 19 15:01:12 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   exec.c 
/php-srcNEWS 
  Log:
  MFB: Fixed bug #47937 (system() calls sapi_flush() regardless of output
  buffering)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/exec.c?r1=1.113.2.3.2.11r2=1.113.2.3.2.12diff_format=u
Index: php-src/ext/standard/exec.c
diff -u php-src/ext/standard/exec.c:1.113.2.3.2.11 
php-src/ext/standard/exec.c:1.113.2.3.2.12
--- php-src/ext/standard/exec.c:1.113.2.3.2.11  Wed Dec 31 11:17:44 2008
+++ php-src/ext/standard/exec.c Sun Apr 19 15:01:11 2009
@@ -16,7 +16,7 @@
| Ilia Alshanetsky il...@php.net |
+--+
  */
-/* $Id: exec.c,v 1.113.2.3.2.11 2008/12/31 11:17:44 sebastian Exp $ */
+/* $Id: exec.c,v 1.113.2.3.2.12 2009/04/19 15:01:11 iliaa Exp $ */
 
 #include stdio.h
 #include php.h
@@ -131,7 +131,9 @@
 
if (type == 1) {
PHPWRITE(buf, bufl);
-   sapi_flush(TSRMLS_C);
+   if (OG(ob_nesting_level)  1) {
+   sapi_flush(TSRMLS_C);
+   }
} else if (type == 2) {
/* strip trailing whitespaces */
l = bufl;
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1472r2=1.2027.2.547.2.1473diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1472 php-src/NEWS:1.2027.2.547.2.1473
--- php-src/NEWS:1.2027.2.547.2.1472Sun Apr 19 14:44:09 2009
+++ php-src/NEWSSun Apr 19 15:01:11 2009
@@ -15,6 +15,8 @@
 - Fixed bug #47969 (ezmlm_hash() returns different values depend on OS).
   (Ilia)
 - Fixed bug #47946 (ImageConvolution overwrites background). (Ilia)
+- Fixed bug #47937 (system() calls sapi_flush() regardless of output
+  buffering). (Ilia)
 - Fixed bug #47903 (@ operator does not work with string offsets). (Felipe)
 - Fixed bug #47893 (CLI aborts on non blocking stdout). (Arnaud)
 - Fixed bug #47849 (Non-deep import loses the namespace). (Rob)



-- 
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 exec.c

2008-04-08 Thread Ilia Alshanetsky
iliaa   Tue Apr  8 17:17:07 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/standard   exec.c 
  Log:
  MFB: Bug #44650   escaepshellscmd() does not check arg count (port from 
5.3)
  
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1136r2=1.2027.2.547.2.1137diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1136 php-src/NEWS:1.2027.2.547.2.1137
--- php-src/NEWS:1.2027.2.547.2.1136Tue Apr  8 14:11:49 2008
+++ php-src/NEWSTue Apr  8 17:17:07 2008
@@ -3,6 +3,7 @@
 ?? Apr 2008, PHP 5.2.6
 - Fixed bug #44667 (proc_open() does not handle pipes with the mode 'wb'
   correctly). (Jani)
+- Fixed bug #44650 (escaepshellscmd() does not check arg count). (Ilia)
 - Fixed bug #44591 (imagegif's filename parameter). (Felipe)
 - Fixed bug #32979 (OpenSSL stream-fd casts broken in 64-bit build)
   (stotty at tvnet dot hu)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/exec.c?r1=1.113.2.3.2.9r2=1.113.2.3.2.10diff_format=u
Index: php-src/ext/standard/exec.c
diff -u php-src/ext/standard/exec.c:1.113.2.3.2.9 
php-src/ext/standard/exec.c:1.113.2.3.2.10
--- php-src/ext/standard/exec.c:1.113.2.3.2.9   Sun Mar 30 12:17:39 2008
+++ php-src/ext/standard/exec.c Tue Apr  8 17:17:07 2008
@@ -16,7 +16,7 @@
| Ilia Alshanetsky [EMAIL PROTECTED] |
+--+
  */
-/* $Id: exec.c,v 1.113.2.3.2.9 2008/03/30 12:17:39 felipe Exp $ */
+/* $Id: exec.c,v 1.113.2.3.2.10 2008/04/08 17:17:07 iliaa Exp $ */
 
 #include stdio.h
 #include php.h
@@ -400,18 +400,19 @@
Escape shell metacharacters */
 PHP_FUNCTION(escapeshellcmd)
 {
-   zval **arg1;
+   char *command;
+   int command_len;
char *cmd = NULL;
 
-   if (zend_get_parameters_ex(1, arg1) == FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, command, 
command_len) == FAILURE) {
+   return;
}
-   
-   convert_to_string_ex(arg1);
-   if (Z_STRLEN_PP(arg1)) {
-   cmd = php_escape_shell_cmd(Z_STRVAL_PP(arg1));
-   RETVAL_STRING(cmd, 1);
-   efree(cmd);
+
+   if (command_len) {
+   cmd = php_escape_shell_cmd(command);
+   RETVAL_STRING(cmd, 0);
+   } else {
+   RETVAL_EMPTY_STRING();
}
 }
 /* }}} */



-- 
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 exec.c

2007-12-09 Thread Ilia Alshanetsky
iliaa   Sun Dec  9 16:37:02 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
/php-src/ext/standard   exec.c 
  Log:
  
  Fixed bug #43533 (escapeshellarg('') returns null).
  
  # Backport of code from 5.3
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1029r2=1.2027.2.547.2.1030diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1029 php-src/NEWS:1.2027.2.547.2.1030
--- php-src/NEWS:1.2027.2.547.2.1029Wed Dec  5 20:04:13 2007
+++ php-src/NEWSSun Dec  9 16:37:01 2007
@@ -3,6 +3,7 @@
 ?? ??? 2008, PHP 5.2.6
 - Fixed weired behavior in CGI parameter parsing. (Dmitry, Hannes Magnusson)
 
+- Fixed bug #43533 (escapeshellarg('') returns null). (Ilia)
 - Fixed bug #43495 (array_merge_recursive() crashes with recursive arrays).
   (Ilia)
 - Fixed bug #43493 (pdo_pgsql does not send username on connect when password
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/exec.c?r1=1.113.2.3.2.2r2=1.113.2.3.2.3diff_format=u
Index: php-src/ext/standard/exec.c
diff -u php-src/ext/standard/exec.c:1.113.2.3.2.2 
php-src/ext/standard/exec.c:1.113.2.3.2.3
--- php-src/ext/standard/exec.c:1.113.2.3.2.2   Thu Oct  4 13:31:11 2007
+++ php-src/ext/standard/exec.c Sun Dec  9 16:37:02 2007
@@ -16,7 +16,7 @@
| Ilia Alshanetsky [EMAIL PROTECTED] |
+--+
  */
-/* $Id: exec.c,v 1.113.2.3.2.2 2007/10/04 13:31:11 jani Exp $ */
+/* $Id: exec.c,v 1.113.2.3.2.3 2007/12/09 16:37:02 iliaa Exp $ */
 
 #include stdio.h
 #include php.h
@@ -392,18 +392,17 @@
Quote and escape an argument for use in a shell command */
 PHP_FUNCTION(escapeshellarg)
 {
-   zval **arg1;
+   char *argument;
+   int argument_len;
char *cmd = NULL;
 
-   if (zend_get_parameters_ex(1, arg1) == FAILURE) {
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, s, argument, 
argument_len) == FAILURE) {
+   return;
}
-   
-   convert_to_string_ex(arg1);
-   if (Z_STRLEN_PP(arg1)) {
-   cmd = php_escape_shell_arg(Z_STRVAL_PP(arg1));
-   RETVAL_STRING(cmd, 1);
-   efree(cmd);
+
+   if (argument) {
+   cmd = php_escape_shell_arg(argument);
+   RETVAL_STRING(cmd, 0);
}
 }
 /* }}} */

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