]> granicus.if.org Git - php/commitdiff
fix file check and avoid segfault
authorAntony Dovgal <tony2001@php.net>
Wed, 27 Aug 2008 07:40:44 +0000 (07:40 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 27 Aug 2008 07:40:44 +0000 (07:40 +0000)
ext/fileinfo/fileinfo.c

index 164b2a241984c2a98e69085c2d78548130141258..5b89dee6c5997cc4c8455ce11ceef075642bcd3d 100644 (file)
@@ -316,7 +316,7 @@ PHP_FUNCTION(finfo_open)
                RETURN_FALSE;
        }
 
-       if (*file) { /* user specified filed, perform open_basedir checks */
+       if (file && *file) { /* user specified file, perform open_basedir checks */
                if (!VCWD_REALPATH(file, resolved_path)) {
                        RETURN_FALSE;
                }