mirror of
https://github.com/php/php-src.git
synced 2025-01-10 13:03:54 +08:00
Fix a stat on a null when the internal database is used.
This commit is contained in:
parent
be09b491da
commit
6978fff657
@ -251,9 +251,12 @@ apprentice_1(struct magic_set *ms, const char *fn, int action,
|
||||
}
|
||||
|
||||
if ((rv = apprentice_map(ms, &magic, &nmagic, fn)) == -1) {
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user