]> granicus.if.org Git - php/commitdiff
check for \0 to be consistent with other functions
authorAntony Dovgal <tony2001@php.net>
Fri, 29 Aug 2008 13:48:26 +0000 (13:48 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 29 Aug 2008 13:48:26 +0000 (13:48 +0000)
ext/fileinfo/fileinfo.c

index 14be430683f1dbb2256c5876cc4e86a250bfad0e..87d83b5580cd85616f16ee40ee16c0bffd8ee6e0 100644 (file)
@@ -550,7 +550,7 @@ PHP_FUNCTION(mime_content_type)
                        } 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;
                                        }