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

From: Date: Sun, 01 Jan 2006 20:12:55 +0000
Subject: cvs: php-src(PHP_5_1) /sapi/apache2handler php_functions.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-36355@lists.php.net to get a copy of this message
iliaa Sun Jan 1 20:12:55 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/sapi/apache2handler php_functions.c Log: Added safety checks http://cvs.php.net/viewcvs.cgi/php-src/sapi/apache2handler/php_functions.c?r1=1.18.2.2&r2=1.18.2.3&diff_format=u Index: php-src/sapi/apache2handler/php_functions.c diff -u php-src/sapi/apache2handler/php_functions.c:1.18.2.2 php-src/sapi/apache2handler/php_functions.c:1.18.2.3 --- php-src/sapi/apache2handler/php_functions.c:1.18.2.2 Sun Jan 1 12:50:18 2006 +++ php-src/sapi/apache2handler/php_functions.c Sun Jan 1 20:12:55 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_functions.c,v 1.18.2.2 2006/01/01 12:50:18 sniper Exp $ */ +/* $Id: php_functions.c,v 1.18.2.3 2006/01/01 20:12:55 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -58,13 +58,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 (#36355) next »