cvs: php-src(PHP_5_3) /ext/fileinfo/libmagic apprentice.c

From: Date: Wed, 22 Oct 2008 16:34:40 +0000
Subject: cvs: php-src(PHP_5_3) /ext/fileinfo/libmagic apprentice.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-53663@lists.php.net to get a copy of this message
scottmac Wed Oct 22 16:34:40 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/fileinfo/libmagic apprentice.c Log: MFH: Fix a stat on a null when the internal database is used. http://cvs.php.net/viewvc.cgi/php-src/ext/fileinfo/libmagic/apprentice.c?r1=1.7.2.10&r2=1.7.2.11&diff_format=u Index: php-src/ext/fileinfo/libmagic/apprentice.c diff -u php-src/ext/fileinfo/libmagic/apprentice.c:1.7.2.10 php-src/ext/fileinfo/libmagic/apprentice.c:1.7.2.11 --- php-src/ext/fileinfo/libmagic/apprentice.c:1.7.2.10 Wed Oct 22 14:15:47 2008 +++ php-src/ext/fileinfo/libmagic/apprentice.c Wed Oct 22 16:34:40 2008 @@ -257,9 +257,12 @@ } if ((rv = apprentice_map(ms, &magic, &nmagic, fn)) == -1) { - if (ms->flags & MAGIC_CHECK) - file_magwarn(ms, "using regular magic file `%s'", fn); - rv = apprentice_load(ms, &magic, &nmagic, fn, action); + if (fn) { + if (ms->flags & MAGIC_CHECK) + file_magwarn(ms, "using regular magic file `%s'", fn); + rv = apprentice_load(ms, &magic, &nmagic, fn, action); + } + if (rv != 0) return -1; }

« previous php.cvs (#53663) next »