Commit Graph

76 Commits

Author SHA1 Message Date
Anatol Belski
4363588f2f Align the ported place with libmagic 2018-06-03 12:14:42 +02:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Anatol Belski
94699d2ade Use suitable datatypes 2018-04-30 14:27:11 +02:00
Anatol Belski
e2182a1ba7 Port libmagic 5.33 2018-04-29 16:02:08 +02:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Anatol Belski
20d930d8f3 Fix remaining signedness warnings 2017-11-14 17:07:09 +01:00
Anatol Belski
a5bc5aed71 Patch core for PCRE2 support
RFC https://wiki.php.net/rfc/pcre2-migration
2017-11-13 19:37:38 +01:00
Anatol Belski
08d8623dec Upgrade bundled libmagic to 5.31 2017-10-11 18:18:55 +02:00
Anatol Belski
411e97c72d Upgraded libmagic to 5.29
yet unfinished port to libmagic 5.28

catch with missing libmagic port pieces

regenerate data file with magic from 5.28

test magic files from 5.28

missing files

fix path

pure c99 is still not supported

move right to 5.29, yet some bugs present

more sync with orig lib

more ZMM usage

use unpatched data for now

partial revert according to bug #67705

Revert "more ZMM usage"

This reverts commit 5e3c9b851034b455942b219b18bdc49c8315c3ee.

several fixes, so it's now closer to the clean port
2016-11-24 13:44:04 +01:00
Xinchen Hui
4cb47bd3bd Fixed compiler warnings 2016-01-25 11:45:14 +08:00
Xinchen Hui
da7f42de38 Fixed bug #71434 (finfo throws notice for specific python file) 2016-01-25 11:40:08 +08:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Dmitry Stogov
753fa0c593 Partial revert of 1a7798c786 that introduced wrong memory access 2015-04-14 15:35:33 +03:00
Stanislav Malyshev
b3709bfc52 Merge branch 'PHP-5.6'
* PHP-5.6: (27 commits)
  fix non-standard C
  update NEWS
  5.4.41 next
  fix CVE num
  update NEWS
  Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode)
  fix test
  fix type in fix for #69085
  fix memory leak & add test
  Fix tests
  fix CVE num
  Fix bug #69337 (php_stream_url_wrap_http_ex() type-confusion vulnerability)
  Fix test
  Additional fix for bug #69324
  More fixes for bug #69152
  Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
  Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar)
  Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER)
  Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4)
  Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault)
  ...

Conflicts:
	Zend/zend_exceptions.c
	ext/curl/interface.c
	ext/dom/document.c
	ext/fileinfo/libmagic/softmagic.c
	ext/gd/gd.c
	ext/hash/hash.c
	ext/pgsql/pgsql.c
	ext/phar/phar.c
	ext/phar/phar_internal.h
	ext/standard/http_fopen_wrapper.c
	ext/standard/link.c
	ext/standard/streamsfuncs.c
	ext/xmlwriter/php_xmlwriter.c
	ext/zlib/zlib.c
2015-04-14 01:28:06 -07:00
Stanislav Malyshev
5776fceb16 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: (27 commits)
  fix non-standard C
  update NEWS
  5.4.41 next
  fix CVE num
  update NEWS
  Fix bug #69441 (Buffer Overflow when parsing tar/zip/phar in phar_set_inode)
  fix test
  fix type in fix for #69085
  fix memory leak & add test
  Fix tests
  fix CVE num
  Fix bug #69337 (php_stream_url_wrap_http_ex() type-confusion vulnerability)
  Fix test
  Additional fix for bug #69324
  More fixes for bug #69152
  Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
  Fixed bug #69324 (Buffer Over-read in unserialize when parsing Phar)
  Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER)
  Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4)
  Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault)
  ...

Conflicts:
	ext/standard/http_fopen_wrapper.c
2015-04-14 01:05:01 -07:00
Stanislav Malyshev
f938112c49 Fix bug #68819 (Fileinfo on specific file causes spurious OOM and/or segfault) 2015-04-11 16:53:21 -07:00
Anatol Belski
5e773b4ce5 catch up with libmagic.orig 2015-03-29 17:57:22 +02:00
Anatol Belski
aeabea4aa9 Fixed bug #69320 libmagic crash when running laravel tests
Basically reverted the part of the new patch to what we have in 5.6
as the current change seems to have bad side effects. Hovere the
in buffer used for PCRE is still doubled (1 << 14), this might or
might not be optimal, so lets observe.
2015-03-29 17:42:59 +02:00
Anatol Belski
3e8a5485e2 catching up 2015-03-08 19:47:59 +01:00
Anatol Belski
f54cf1ec57 more after patch fixes 2015-03-08 19:47:50 +01:00
Anatol Belski
1ebe527757 restore good patch parts 2015-03-08 19:47:48 +01:00
Anatol Belski
49dc53722b use zend_strndup 2015-03-08 19:47:41 +01:00
Anatol Belski
1b77e51ad7 started to patch for libmagic.next
everything is broken yet
2015-03-08 19:47:38 +01:00
Anatol Belski
9603f16f99 catch up with the previous cve-2014-3538 patch 2015-03-08 19:47:33 +01:00
Anatol Belski
f39a8517e0 catching up 2015-03-08 19:47:31 +01:00
Anatol Belski
ca98547801 catching up 2015-03-08 19:47:28 +01:00
Anatol Belski
0d410fc2d2 more after patch fixes 2015-03-08 19:47:20 +01:00
Anatol Belski
1a7798c786 restore good patch parts 2015-03-08 19:47:18 +01:00
Anatol Belski
a1883a8523 use zend_strndup 2015-03-08 19:47:09 +01:00
Anatol Belski
2181ed2e2a started to patch for libmagic.next
everything is broken yet
2015-03-08 19:47:06 +01:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
723319813b Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  updated NEWS
  Fixed bug #68735 fileinfo out-of-bounds memory access
2015-01-04 14:25:28 +01:00
Anatol Belski
28e44f9d44 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  Fixed bug #68735 fileinfo out-of-bounds memory access
2015-01-04 14:23:56 +01:00
Anatol Belski
ede59c8feb Fixed bug #68735 fileinfo out-of-bounds memory access 2015-01-04 14:20:21 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
c00424e427 bring back all the TSRMLS_FETCH() stuff
for better comparability with the mainstream
2014-10-15 09:37:55 +02:00
Anatol Belski
26e5f9bab7 cleanup TSRMLS_FETCH in ext/fileinfo 2014-09-26 21:30:22 +02:00
Dmitry Stogov
3bc8a958c5 Fixed useless or duplicated IS_INTERNED() checks 2014-09-19 15:41:01 +04:00
Anatol Belski
af59e92b24 master renames phase 7 2014-08-25 21:51:49 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Dmitry Stogov
4c716e8b51 Merge branch 'master' into test
* master: (39 commits)
  Add __debugInfo() to UPGRADING.
  fix TS build
  Update NEWS
  Update NEWS
  Update NEWS
  Small tidy ups and raise visibility of GitHub PR process
  Bug #41631: Observe socket read timeouts in SSL streams
  wrap int8_t and int16_t with #ifdef to avoid possible clashes
  - Updated to version 2014.6 (2014f)
  Removed Countable::count() change info from UPGRADE.INTERNALS too
  NEWS and UPGRADING for intdiv()
  Revert "Add SO_REUSEPORT + SO_BROADCAST support via socket stream context option"
  Fixed skip case for intdiv 64-bit test
  Use callback structure
  Add EXPECTF
  Fix handling of multi-result sets with PS...used to clean not only the result set but the whole PS.
  5.5.17 now
  5.4.33-dev now
  Add SO_REUSEPORT + SO_BROADCAST support via socket stream context option
  Add SO_REUSEPORT + SO_BROADCAST support via socket stream context option
  ...

Conflicts:
	ext/fileinfo/libmagic/softmagic.c
	main/streams/xp_socket.c
2014-08-11 11:38:41 +04:00
Andrey Hristov
3dc9bef819 Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	ext/fileinfo/data_file.c
	ext/fileinfo/libmagic/softmagic.c
	ext/fileinfo/magicdata.patch
2014-08-06 16:25:12 +03:00
Stanislav Malyshev
28786a2f82 Fix bug #67705 (extensive backtracking in rule regular expression) 2014-08-04 00:09:15 -07:00
Stanislav Malyshev
eeaec70758 Fix bug #67705 (extensive backtracking in rule regular expression) 2014-08-04 00:05:40 -07:00
Dmitry Stogov
dd1c68e67f Merge branch 'master' into phpng
* master: (77 commits)
  NEWS entry for Fix potential segfault in dns_get_record()
  NEWS entry for "Fix potential segfault in dns_get_record()"
  NEWS entry for Fix potential segfault in dns_get_record(
  Fix potential segfault in dns_get_record()
  Revert "Add optional second arg to unserialize()"
  5.5.15 now
  update NEWS
  Fix bug #66127 (Segmentation fault with ArrayObject unset)
  5.4.31 next
  Add NEWS. This doesn't need UPGRADING (or an RFC), IMO.
  Fix broken test.
  Add a mime type map generation script and update the header.
  Move the mime type map out of php_cli_server.c for easier generation.
  Replace the CLI server's linear search for extensions with a hash table.
  fix test
  Remove unused included file
  NEWS
  NEWS
  NEWS
  Fixed Bug #67413 	fileinfo: cdf_read_property_info insufficient boundary chec
  ...

Conflicts:
	Zend/zend_closures.c
	Zend/zend_execute.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/spl/spl_array.c
	ext/standard/basic_functions.c
	ext/standard/dns.c
	ext/standard/var.c
2014-06-12 05:07:33 +04:00
Remi Collet
5e7cb43890 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  NEWS
  Fixed Bug #67410 fileinfo: mconvert incorrect handling of truncated pascal string size
2014-06-10 14:05:02 +02:00
Remi Collet
e77659a8c8 Fixed Bug #67410 fileinfo: mconvert incorrect handling of truncated pascal string size
Upstream
27a14bc7ba
2014-06-10 14:02:36 +02:00
Dmitry Stogov
449ea00a48 Fixed ext/fileinfo conversion mistakes 2014-05-07 17:58:28 +04:00
Xinchen Hui
9ef21b7606 Refactor fileinfo 2014-05-07 13:50:29 +08:00