Commit graph

83 commits

Author SHA1 Message Date
Christoph M. Becker
e589609b4c Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #77961: finfo_open crafted magic parsing SIGABRT
2020-11-24 14:06:53 +01:00
Christoph M. Becker
39f95f5614 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.
2020-11-24 14:01:15 +01:00
Anatol Belski
e64c386b62 libmagic: Update patch
[ci skip]

Signed-off-by: Anatol Belski <ab@php.net>
2020-09-02 21:25:24 +02:00
Anatol Belski
486866c1b9 libmagic: Update patch [ci skip]
Signed-off-by: Anatol Belski <ab@php.net>
2020-08-29 21:27:01 +02:00
George Peter Banyard
1b2ec73c1d Drop various unused macros/APIs
Also convert_libmagic_pattern() to return a zend_string*

Closes GH-6029
2020-08-26 12:59:43 +02:00
David Carlier
f32653accc fileinfo build fix proposal for haiku.
Haiku already defines a unichar type and different than the fileinfo's anyway.

Closed GH-5983
2020-08-21 16:13:09 +02:00
George Peter Banyard
3f286fa89a Promote Notice to Warning in libmagic
The current behaviour makes little to no sense, having a notice which starts with 'Warning:' should just be a warning

Closes GH-5824
2020-07-10 14:43:43 +02:00
George Peter Banyard
f91f72607b Drop unnecessary stdint and inttypes header checks
These are always available as of C99.

Closes GH-5323

Co-authored-by: "Christoph M. Becker" <cmbecker69@gmx.de>
2020-04-22 20:18:19 +02:00
George Peter Banyard
457380cae7 Drop wchar header check as always defined since C95 2020-03-31 00:14:56 +02:00
Christoph M. Becker
7702b693b5 Fix #79283: Segfault in libmagic patch contains a buffer overflow
To solve this, we properly calculate the required string length upfront
instead of allocating an oversized string (`len * 4 + 4`).
2020-03-16 22:42:15 -07:00
Christoph M. Becker
aa88f33f7d Fix #79283: Segfault in libmagic patch contains a buffer overflow
To solve this, we properly calculate the required string length upfront
instead of allocating an oversized string (`len * 4 + 4`).
2020-03-16 22:40:48 -07:00
Christoph M. Becker
7fa6e2a25c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Update libmagic.patch
2020-03-02 15:08:50 +01:00
Christoph M. Becker
f15ab32af8 Update libmagic.patch
Some commits missed to update the patch file, so we're catching up on
this.

To generally make this easier, we back-port generate_patch.sh from
PHP-7.4, where we now also generate magic.h from magic.h.in.
2020-03-02 15:03:45 +01:00
Peter Kokot
f002761e08 Update libmagic patch
This simplifies the libmagic patch:
- in upstream the HAVE_STRERROR check has been removed
- in upstream library the HAVE_SIGNAL_H has been removed
- indentations syncs with the upstream library
- some irrelevant changes removed from the patch (log comment), upstream
  has this correctly logged already so no need to patch the comment.

Closes GH-4298
2019-07-08 12:38:47 +02:00
Anatol Belski
dacf9ecc46 Update libmagic.patch [ci skip] 2019-06-29 17:36:11 +02:00
Anatol Belski
2ba9177d4f [ci skip] Update libmagic.patch 2019-05-30 14:09:00 +02:00
Nikita Popov
908660c1d7 Avoid maybe uninit warning in libmagic
GCC 5 false positive, gone in newer versions.
2019-04-15 10:59:45 +02:00
Nikita Popov
ba40f505e5 Fix unused variable warnings in libmagic
These variables are only used in assertions.
2019-04-12 12:03:26 +02:00
Nikita Popov
b65cb7e2aa Fix libmagic warnings 2019-04-11 15:20:05 +02:00
Nikita Popov
f6521659ca Add script to generate libmagic.patch 2019-04-11 15:12:20 +02:00
Nikita Popov
275fa53564 Accept zend_string* instead of char* in php_pcre_match_impl() 2019-03-18 12:32:06 +01:00
Fabien Villepinte
b6f9ade9f2 Remove unused variables 2019-03-17 23:29:51 +01:00
Anatol Belski
3e92365fa2 Update libmagic.patch [skip ci] 2019-03-08 21:55:15 +01:00
Anatol Belski
ee50461e4b Update libmagic.patch [ci skip] 2018-11-10 22:02:44 +01:00
Anatol Belski
a957af6c06 Update libmagic.patch [ci skip] 2018-11-05 22:25:31 +01:00
Anatol Belski
3082600326 Update libmagic.patch [ci skip] 2018-08-06 14:28:32 +02:00
Anatol Belski
01b9975639 [ci skip] Update libmagic.patch 2018-06-03 14:06:11 +02:00
Anatol Belski
dbea6e154d Update libmagic.patch 2018-04-30 14:29:55 +02:00
Anatol Belski
e2182a1ba7 Port libmagic 5.33 2018-04-29 16:02:08 +02:00
Anatol Belski
259085f201 Update libmagic.patch, also reflecting PCRE2 changes 2017-12-21 15:47:07 +01:00
Anatol Belski
b4db9e9acc Update libmagic.patch 2017-10-23 19:18:25 +02:00
Anatol Belski
747f70ba82 Cleanup irrelevant info 2017-10-11 18:40:16 +02:00
Anatol Belski
08d8623dec Upgrade bundled libmagic to 5.31 2017-10-11 18:18:55 +02:00
Xinchen Hui
2d21404e25 Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Fixed bug #74379 (syntax error compile error in libmagic/apprentice.c)
  Missed NEWS

Conflicts:
	ext/fileinfo/libmagic.patch
2017-04-10 11:47:38 +08:00
Xinchen Hui
341ff7119f Fixed bug #74379 (syntax error compile error in libmagic/apprentice.c) 2017-04-10 11:44:41 +08:00
Anatol Belski
703c9ee1a4 sync libmagic.patch 2017-01-05 23:32:30 +01:00
Anatol Belski
020b87a40d update libmagic.patch 2016-11-24 14:58:54 +01:00
Xinchen Hui
b68d525f16 Update libmagic.patch for PHP-7.0 2016-01-25 11:45:32 +08:00
Anatol Belski
a7e6687df6 updated libmagic.patch 2015-03-29 18:22:42 +02:00
Kalle Sommer Nielsen
88b9d485d6 Drop old VC support for ext/fileinfo.
@Anatol, I generated the updated patch file against file 5.22, since you are the one that usually updates it, can you please confirm it works?
2015-03-29 07:48:48 +02:00
Anatol Belski
12babf59c1 updated libmagic.patch 2015-03-08 19:48:05 +01:00
Anatol Belski
9b1bdccb04 libmagic.patch so far 2015-03-08 19:47:15 +01:00
Reeze Xia
2b396a8092 Update libmagic.patch to reflect changes made 2015-02-10 20:48:58 +08:00
Anatol Belski
4d6fb5e684 updated libmagic.patch 2015-01-04 17:09:06 +01:00
Anatol Belski
fa0b5e2c6d updated libmagic.patch 2014-12-30 20:28:13 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Remi Collet
f0f51da936 drop dead/unused code 2014-12-09 11:25:53 +01:00
Anatol Belski
71a653452f updated libmagic.patch in master 2014-10-25 12:06:17 +02:00
Anatol Belski
3fd792b3b9 updated libmagic.patch in 5.6+ 2014-07-01 10:28:43 +02:00
Anatol Belski
fb991bd7fd updated libmagic.patch for 5.6+ 2014-05-27 22:39:54 +02:00