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

From: Date: Sun, 01 Jan 2006 20:14:06 +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-36358@lists.php.net to get a copy of this message
iliaa Sun Jan 1 20:14:06 2006 UTC Modified files: (Branch: PHP_4_4) /php-src/sapi/apache2handler php_functions.c Log: MFH: Added safety checks http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache2handler/php_functions.c?r1=1.1.2.12.2.1&r2=1.1.2.12.2.2&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.1 php-src/sapi/apache2handler/php_functions.c:1.1.2.12.2.2 --- php-src/sapi/apache2handler/php_functions.c:1.1.2.12.2.1 Sun Jan 1 13:47:01 2006 +++ php-src/sapi/apache2handler/php_functions.c Sun Jan 1 20:14:06 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_functions.c,v 1.1.2.12.2.1 2006/01/01 13:47:01 sniper Exp $ */ +/* $Id: php_functions.c,v 1.1.2.12.2.2 2006/01/01 20:14:06 iliaa Exp $ */ #include "php.h" #include "ext/standard/php_smart_str.h" @@ -56,13 +56,11 @@ static request_rec *php_apache_lookup_uri(char *filename TSRMLS_DC) { - php_struct *ctx; + php_struct *ctx = SG(server_context); - if (!filename) { + if (!filename || !ctx || !ctx->r) { return NULL; } - - ctx = SG(server_context); return ap_sub_req_lookup_uri(filename, ctx->r, ctx->r->output_filters); }

« previous php.cvs (#36358) next »