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

index c0cc47e84a99d0c2f60d6b9de2bd68a3cac775e6..e3f938d8fce9027f9dac8599246a6de348e97c89 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 filed, perform open_basedir checks */
                if (!VCWD_REALPATH(file, resolved_path)) {
                        RETURN_FALSE;
                }