Commit Graph

501 Commits

Author SHA1 Message Date
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Anatol Belski
a36dd1dfd8 add test for bug #57547 2016-11-24 19:25:47 +01:00
Christoph M. Becker
9d03310b23 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-08 18:45:27 +02:00
Christoph M. Becker
243d5fcb1f Add test for bug #69107: finfo no longer detects PHP files 2016-08-08 18:43:33 +02:00
Anatol Belski
e6bb7eb3aa Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix borked mainstream patch
  5.5.35 now
2016-03-31 01:38:22 +02:00
Anatol Belski
a00c2b1bf5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix borked mainstream patch
  5.5.35 now
2016-03-31 01:36:47 +02:00
Anatol Belski
4b0b1cec00 fix borked mainstream patch 2016-03-31 01:33:38 +02:00
Anatol Belski
9dc6c33740 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix test to not to cause false positives
2016-03-31 01:30:23 +02:00
Anatol Belski
ed707a5217 fix test to not to cause false positives 2016-03-31 01:29:05 +02:00
Anatol Belski
5272184a1e Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file
The actual fix is applying the upstream patch from
6713ca45e7
2016-03-29 13:11:25 +02:00
Anatol Belski
84990ab346 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file
2016-03-29 13:11:17 +02:00
Anatol Belski
fe13566c93 Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file
The actual fix is applying the upstream patch from
6713ca45e7
2016-03-29 13:10:39 +02:00
Anatol Belski
e93c6910fc Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file
The actual fix is applying the upstream patch from
6713ca45e7
2016-03-28 00:45:19 +02:00
Nikita Popov
726e87e142 Merge branch 'PHP-5.6' into PHP-7.0 2016-03-02 00:37:40 +01:00
Nikita Popov
471540d285 Fix intermittent failure of bug_68819_002.phpt
The test used rand(32, 127) to select the character, however
chr(127) results in "data" instead of the expected result, so this
test would fail in something like 1% of the runs.

Replace rand() with fixed character "a".
2016-03-02 00:34:36 +01:00
Xinchen Hui
b68d525f16 Update libmagic.patch for PHP-7.0 2016-01-25 11:45:32 +08: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
Xinchen Hui
47e7662a13 Update libmagic.patch for PHP-5.6 2016-01-25 11:25:04 +08:00
Xinchen Hui
a458a4fdc1 Fixed bug #7143 (finfo throws notice for specific python file)
There seems be a bug while it was changed from regexec to
preg_match_impl:
https://github.com/php/php-src/commit/46906925#diff-56e765972d18c84894ea061cfe58076aR1757
2016-01-25 11:24:44 +08:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Anatol Belski
545b364d56 remove TSRMLS_*
either remains or merged in from PHP5
2015-08-02 13:42:01 +02: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
Aaron Piotrowski
110e0a5a2c Merge branch 'master' into throwable-interface
# Conflicts:
#	Zend/zend_language_scanner.c
#	Zend/zend_language_scanner.l
#	ext/simplexml/tests/SimpleXMLElement_xpath.phpt
2015-06-14 18:53:11 -05:00
Anatol Belski
c444c4172f further cleanups with S_IF* macros generalized declarations 2015-05-25 18:03:28 +02:00
Aaron Piotrowski
64b167d201 Updated tests to reflect exception class changes. 2015-05-16 16:49:14 -05:00
Anatol Belski
63c92a6e96 fix test 2015-04-14 15:24:46 +02:00
Anatol Belski
bc63491da8 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix test
2015-04-14 15:21:47 +02:00
Anatol Belski
3803bbde24 fix test 2015-04-14 15:20:44 +02: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
0cb9d75cb6 Merge branch 'PHP-5.4.40' into PHP-5.5.24
* PHP-5.4.40:
  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)
  Fixed bug #68901 (use after free)
  Fixed bug #68740 (NULL Pointer Dereference)
  Fix bug #66550 (SQLite prepared statement use-after-free)
  Better fix for #68601 for perf 81e9a993f2
  Fix bug #68601 buffer read overflow in gd_gif_in.c
  Revert "Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4"
  Fixed bug #69293
  Add ZEND_ARG_CALLABLE_INFO to allow internal function to type hint against callable.
2015-04-11 16:56:12 -07:00
Stanislav Malyshev
4435b9142f Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) 2015-04-11 16:53:22 -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
Nikita Popov
122d759618 Always throw TypeException on throwing zpp failures
Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to
report FAILURE errors using a TypeException instead of a Warning,
like it would happen in strict mode.

Adds a zend_parse_parameters_throw() convenience function, which
invokes zpp with this flag.

Converts all cases I could identify, where we currently have
throwing zpp usage in constructors and replaces them with this API.
Error handling is still replaced to EH_THROW in some cases to handle
other, domain-specific errors in constructors.
2015-04-06 11:27:34 +02:00
Anatol Belski
a0eaa37afe missing includes 2015-04-01 13:39:25 +02:00
Dmitry Stogov
1018f462d8 Patch improvement:
Removed the corresponding core code.
Fixed ext/com_dotnet and ext/date.
Refactored ext/intl changes.
Improved ext/fileinfo and ext/pdo changes.
Fixed tests.
2015-03-30 18:53:38 +03:00
Dmitry Stogov
9155a267ad Merge branch 'InternalClassClean' of github.com:Danack/php-src into InternalClassClean
* 'InternalClassClean' of github.com:Danack/php-src:
  Fixed indentation. Fixed comment style. Fixed commented out code.
  Reverted change to function name and added note of why it is different from the class it is actually changing.
  Made UConverter throw an exception if the constructor fails.
  Fixed PDO constructor to not return null.
  Fixed fileinfo behaviour.
  Made Phar throw exception on bad constructor.
  Converted intl extension to use IntlException in constructors.
  Fixed SplFixedArray and tests.
  Fixed ReflectionExtension and ReflectionProperty.
  Fixed ReflectionFunction, ReflectionMethod and ReflectionParameter.
  Fixed PDORow behaviour and message.
2015-03-30 12:14:43 +03:00
Anatol Belski
a7e6687df6 updated libmagic.patch 2015-03-29 18:22:42 +02:00
Anatol Belski
5b6427c40f further sync with libmagic.orig 2015-03-29 18:17:02 +02:00
Anatol Belski
f51d78a35d catch up with libmagic.orig
that'll simplify future merges
2015-03-29 18:11:11 +02:00
Anatol Belski
662c439087 fix typo 2015-03-29 17:59:28 +02:00
Anatol Belski
5e773b4ce5 catch up with libmagic.orig 2015-03-29 17:57:22 +02:00
Anatol Belski
a935c02210 added test for bug #69320 2015-03-29 17:52:38 +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
Kalle Sommer Nielsen
0ca8ffa2b8 Forgot this one in the last commit, removes old VC support from ext/fileinfo 2015-03-29 07:54:18 +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
Danack
78ebf83ad3 Fixed fileinfo behaviour. 2015-03-15 14:54:49 +00:00