cvs: php-src(PHP_4_4) /sapi/apache2handler php_functions.c

From: Date: Mon, 02 Jan 2006 22:22:07 +0000
Subject: cvs: php-src(PHP_4_4) /sapi/apache2handler php_functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-36368@lists.php.net to get a copy of this message
iliaa Mon Jan 2 22:22:07 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/sapi/apache2handler php_functions.c Log: MFH: Fixed possible crash in apache_getenv()/apache_setenv() on invalid parameters. http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache2handler/php_functions.c?r1=1.1.2.12.2.3&r2=1.1.2.12.2.4&diff_format=u Index: php-src/sapi/apache2handler/php_functions.c diff -u php-src/sapi/apache2handler/php_functions.c:1.1.2.12.2.3 php-src/sapi/apache2handler/php_functions.c:1.1.2.12.2.4 --- php-src/sapi/apache2handler/php_functions.c:1.1.2.12.2.3 Mon Jan 2 22:11:22 2006 +++ php-src/sapi/apache2handler/php_functions.c Mon Jan 2 22:22:07 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_functions.c,v 1.1.2.12.2.3 2006/01/02 22:11:22 sniper Exp $ */ +/* $Id: php_functions.c,v 1.1.2.12.2.4 2006/01/02 22:22:07 iliaa Exp $ */ #include "php.h" #include "ext/standard/php_smart_str.h" @@ -263,10 +263,13 @@ ctx = SG(server_context); r = ctx->r; - if (arg_count == 3 && Z_STRVAL_PP(walk_to_top)) { - while(r->prev) { - r = r->prev; - } + if (arg_count == 3) { + convert_to_boolean_ex(walk_to_top); + if (Z_LVAL_PP(walk_to_top)) { + while(r->prev) { + r = r->prev; + } + } } convert_to_string_ex(variable); @@ -299,10 +302,13 @@ ctx = SG(server_context); r = ctx->r; - if (arg_count == 2 && Z_STRVAL_PP(walk_to_top)) { - while(r->prev) { - r = r->prev; - } + if (arg_count == 2) { + convert_to_boolean_ex(walk_to_top); + if (Z_LVAL_PP(walk_to_top)) { + while(r->prev) { + r = r->prev; + } + } } convert_to_string_ex(variable);

« previous php.cvs (#36368) next »