cvs: php-src /main fopen_wrappers.c

From: Date: Tue, 27 Sep 2005 15:07:39 +0000
Subject: cvs: php-src /main fopen_wrappers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-34160@lists.php.net to get a copy of this message
iliaa Tue Sep 27 11:07:39 2005 EDT Modified files: /php-src/main fopen_wrappers.c Log: Fixed bug #32937 (open_basedir looses trailing / in the limiter). Patch by Adam Conrad http://cvs.php.net/diff.php/php-src/main/fopen_wrappers.c?r1=1.175&r2=1.176&ty=u Index: php-src/main/fopen_wrappers.c diff -u php-src/main/fopen_wrappers.c:1.175 php-src/main/fopen_wrappers.c:1.176 --- php-src/main/fopen_wrappers.c:1.175 Wed Aug 3 10:08:28 2005 +++ php-src/main/fopen_wrappers.c Tue Sep 27 11:07:38 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fopen_wrappers.c,v 1.175 2005/08/03 14:08:28 sniper Exp $ */ +/* $Id: fopen_wrappers.c,v 1.176 2005/09/27 15:07:38 iliaa Exp $ */ /* {{{ includes */ @@ -108,8 +108,8 @@ /* Handler for basedirs that end with a / */ resolved_basedir_len = strlen(resolved_basedir); if (basedir[strlen(basedir) - 1] == PHP_DIR_SEPARATOR) { - if (resolved_basedir[resolved_basedir_len - 1] == '/') { - resolved_basedir[resolved_basedir_len - 1] = PHP_DIR_SEPARATOR; + if (resolved_basedir[resolved_basedir_len - 1] != PHP_DIR_SEPARATOR) { + resolved_basedir[resolved_basedir_len] = PHP_DIR_SEPARATOR; resolved_basedir[++resolved_basedir_len] = '\0'; } }

« previous php.cvs (#34160) next »