diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-11-23 17:12:46 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-11-24 14:01:15 +0100 |
commit | 39f95f56144d595b9af7828726c3e28c313fb2b7 (patch) | |
tree | 8b7f44245d65ebdebbab53716061266f1fac11dc /ext/fileinfo/libmagic | |
parent | 5f9c82d514980f96e5e88f6c2633571ce31b57a7 (diff) | |
download | php-git-39f95f56144d595b9af7828726c3e28c313fb2b7.tar.gz |
Fix #77961: finfo_open crafted magic parsing SIGABRT
libmagic may abort the running process, which is not desirable for PHP;
we raise a fatal error instead.
Closes GH-6437.
Diffstat (limited to 'ext/fileinfo/libmagic')
-rw-r--r-- | ext/fileinfo/libmagic/file.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/fileinfo/libmagic/file.h b/ext/fileinfo/libmagic/file.h index 698a307deb..f462622bd5 100644 --- a/ext/fileinfo/libmagic/file.h +++ b/ext/fileinfo/libmagic/file.h @@ -82,6 +82,8 @@ #include <sys/stat.h> #include <stdarg.h> +#define abort() zend_error_noreturn(E_ERROR, "fatal libmagic error") + #define ENABLE_CONDITIONALS #ifndef MAGIC |