cvs: php-src(PHP_5_3) /ext/fileinfo fileinfo.c
| From: | Antony Dovgal | Date: | Fri, 29 Aug 2008 13:48:39 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/fileinfo fileinfo.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-52758@lists.php.net to get a copy of this message | ||
tony2001 Fri Aug 29 13:48:39 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/fileinfo fileinfo.c
Log:
MFH: check for \0 to be consistent with other functions
http://cvs.php.net/viewvc.cgi/php-src/ext/fileinfo/fileinfo.c?r1=1.20.2.8&r2=1.20.2.9&diff_format=u
Index: php-src/ext/fileinfo/fileinfo.c
diff -u php-src/ext/fileinfo/fileinfo.c:1.20.2.8 php-src/ext/fileinfo/fileinfo.c:1.20.2.9
--- php-src/ext/fileinfo/fileinfo.c:1.20.2.8 Fri Aug 29 13:39:01 2008
+++ php-src/ext/fileinfo/fileinfo.c Fri Aug 29 13:48:38 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: fileinfo.c,v 1.20.2.8 2008/08/29 13:39:01 derick Exp $ */
+/* $Id: fileinfo.c,v 1.20.2.9 2008/08/29 13:48:38 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -550,7 +550,7 @@
} else { /* local file */
char resolved_path[MAXPATHLEN];
- if (Z_STRVAL_P(what) && VCWD_REALPATH(Z_STRVAL_P(what), resolved_path)) {
+ if (*Z_STRVAL_P(what) && VCWD_REALPATH(Z_STRVAL_P(what), resolved_path)) {
if ((PG(safe_mode) && (!php_checkuid(resolved_path, NULL,
CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(resolved_path TSRMLS_CC)) {
goto cleanup;
}