Commit Graph

714 Commits

Author SHA1 Message Date
Anatol Belski
4ac29543d6 Merge branch 'PHP-7.0'
* PHP-7.0:
  yet another test rewrite
2016-06-23 09:42:50 +02:00
Anatol Belski
056c2ce349 yet another test rewrite 2016-06-23 09:42:17 +02:00
Xinchen Hui
dad500ef6a Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #72476 (Memleak in jit_stack)
2016-06-23 14:07:08 +08:00
Xinchen Hui
bd74e7d013 Fixed bug #72476 (Memleak in jit_stack) 2016-06-23 14:06:48 +08:00
Anatol Belski
0b0758cc31 Merge branch 'PHP-7.0'
* PHP-7.0:
  rewrite test
2016-06-22 19:47:59 +02:00
Anatol Belski
4edbac6ec5 rewrite test 2016-06-22 19:46:02 +02:00
Anatol Belski
d20372cf6c Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #72463 mail fails with invalid argument
2016-06-22 19:10:57 +02:00
Anatol Belski
e453904251 Fixed bug #72463 mail fails with invalid argument 2016-06-22 19:06:33 +02:00
Anatol Belski
9d4fe9672a upgraded to PCRE 8.39 2016-06-19 20:38:31 +02:00
Xinchen Hui
0b3a4c6101 Revert "Revert "fix #72143 (preg_replace uses int instead of size_t on zend_string_allocs)""
obviously I read the change is in argument lists by mistake :<

This reverts commit 9e7afa7514.
2016-05-16 06:22:13 -07:00
Xinchen Hui
9e7afa7514 Revert "fix #72143 (preg_replace uses int instead of size_t on zend_string_allocs)"
ABI break

This reverts commit fb951553be.
2016-05-16 11:24:16 +08:00
Joe Watkins
90f46f2c5b fix #72143 (preg_replace uses int instead of size_t on zend_string_allocs) 2016-05-14 08:21:32 +01:00
Joe Watkins
fb951553be fix #72143 (preg_replace uses int instead of size_t on zend_string_allocs) 2016-05-14 08:20:41 +01:00
Dmitry Stogov
37f7c71f3e Simplified condition 2016-04-29 12:33:54 +03:00
Anatol Belski
241ba9dcb1 if there's no JIT support, no RINIT is really needed 2016-03-22 21:42:21 +01:00
Anatol Belski
e988239634 decrease the default PCRE JIT stack to 64K 2016-03-21 18:59:39 +01:00
Anatol Belski
e23a41225f Increase PCRE JIT stack size
It is done by implementing the custom stack usage. This makes the
JIT with mode on more compatible with the JIT mode off. Until now, the
default PCRE JIT stack was used which is 32kb big by default. There
are situations where some patterns would fail with JIT while working
correctly without JIT.

The starting size of the JIT stack is still set to 32kb, while the
max is set to the permissive 256kb (and can be increased up to 1mb).
As until now no suchlike bugs regarding JIT were reported, it is expected,
that the stack usage will stay by 32kb in most cases. Though providing
the custom stack, applications will have more room for some sporadic
stack increase, thus more compatibility.
2016-03-21 17:31:26 +01:00
Nikita Popov
5a6da79fd0 Fix bug #71659 2016-03-09 23:00:53 +01:00
James Titcumb
c4b188871e Fix bug #71575 removing extra semicolons outside macros 2016-03-03 16:41:03 +01:00
Xinchen Hui
0490d4a404 Happy Year of Monkey (Forgot test of #71537) 2016-02-08 10:22:16 +08:00
Xinchen Hui
336e39f2b1 Fixed bug #71537 (PCRE segfault from Opcache) 2016-02-07 23:19:24 +08:00
Stanislav Malyshev
916c1fb3af Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Upgrade bundled PCRE to 8.38
  Fixed NEWS file entry
  fix the fix for bug #70976 (imagerotate)

Conflicts:
	ext/pcre/pcrelib/config.h
2016-01-31 21:39:24 -08:00
Stanislav Malyshev
00788f9cfb Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Upgrade bundled PCRE to 8.38
  Fixed NEWS file entry
  fix the fix for bug #70976 (imagerotate)
2016-01-31 21:06:31 -08:00
Stanislav Malyshev
ca02d9c2d6 Upgrade bundled PCRE to 8.38 2016-01-31 20:37:47 -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
Xinchen Hui
817513af4e Fixed bug #71178 (preg_replace with arrays creates [0] in replace array if not already set) 2015-12-21 18:10:48 +08:00
Anatol Belski
c0ca731d7a add comment to test 2015-10-07 09:43:28 +02:00
Dmitry Stogov
560e4fa393 Removed or simplified incorrect SEPARATE_*() macros usage. 2015-09-29 11:17:43 +03:00
Stanislav Malyshev
9b1a224d4e Merge branch 'PHP-5.6'
* PHP-5.6: (21 commits)
  fix unit tests
  update NEWS
  add NEWS for fixes
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix bug ##70284 (Use after free vulnerability in unserialize() with GMP)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  ...

Conflicts:
	ext/exif/exif.c
	ext/gmp/gmp.c
	ext/pcre/php_pcre.c
	ext/session/session.c
	ext/session/tests/session_decode_variation3.phpt
	ext/soap/soap.c
	ext/spl/spl_observer.c
	ext/standard/var.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	ext/xsl/xsltprocessor.c
2015-09-02 00:37:20 -07:00
Stanislav Malyshev
a6c063d663 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  More fixes for bug #70219
2015-09-01 12:51:48 -07:00
Stanislav Malyshev
c19d59c550 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  add NEWS for fixes
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  5.4.45 next

Conflicts:
	ext/pcre/php_pcre.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	ext/zip/php_zip.c
2015-09-01 12:06:41 -07:00
Stanislav Malyshev
33d3acaae7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  5.4.45 next

Conflicts:
	configure.in
	ext/pcre/php_pcre.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_version.h
2015-09-01 11:42:19 -07:00
Stanislav Malyshev
6935058a98 Merge branch 'PHP-5.4.45' into PHP-5.5.29
* PHP-5.4.45:
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)

Conflicts:
	ext/pcre/php_pcre.c
	ext/standard/var_unserializer.c
2015-09-01 00:28:39 -07:00
Stanislav Malyshev
03964892c0 Fix bug #70345 (Multiple vulnerabilities related to PCRE functions) 2015-08-28 22:52:50 -07:00
Anatol Belski
1553ce2093 add some range checks to pcre 2015-08-26 16:39:53 +02:00
Christoph M. Becker
1ec40e84d4 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix #70232: Incorrect bump-along behavior with \K and empty string match

Resolved conflicts:
	ext/pcre/php_pcre.c
2015-08-13 14:28:16 +02:00
Christoph M. Becker
b9f23c2152 Fix #70232: Incorrect bump-along behavior with \K and empty string match
To do global matching (/g), for every empty match we have to do a second match
with PCRE_NOTEMPTY turned on. That may fail, however, when the \K escape
sequence is involved. For this purpose libpcre 8.0 introduced the
PCRE_NOTEMPTY_ATSTART flag, which we will use if available, and otherwise fall
back to the old (possibly buggy) behavior.
2015-08-13 14:20:04 +02:00
Christoph M. Becker
5be8872f44 allow to skip slow tests 2015-07-26 17:33:09 +02:00
Christoph M. Becker
6855e2f08b Merge branch 'pull-request/1439'
* pull-request/1439:
  fixed broken test
  add new error constant PREG_JIT_STACKLIMIT_ERROR
2015-07-29 18:21:46 +02:00
Anatol Belski
0787cd60ed first stone on using the unified globals accessor 2015-07-29 10:36:30 +02:00
Christoph M. Becker
e6f55339cc add new error constant PREG_JIT_STACKLIMIT_ERROR 2015-07-26 23:40:38 +02:00
Christoph M. Becker
d73287be18 Merge branch 'PHP-5.6'
* PHP-5.6:
  allow to skip slow tests
2015-07-26 17:35:23 +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
Dmitry Stogov
4bd22cf1c1 Improved zend_string API (Francois Laupretre)
Squashed commit of the following:

commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date:   Fri Jun 26 01:23:31 2015 +0200

    Use the new 'ZSTR' macros in the rest of the code.

    Does not change anything to the generated code (thanks to compat macros) but cleaner.

commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date:   Thu Jun 25 13:45:06 2015 +0200

    Improve zend_string API

    Add missing methods
2015-06-29 16:44:54 +03:00
Christoph M. Becker
ca049e0ae9 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fixed Bug #53823 (preg_replace: * qualifier on unicode replace garbles the string)
2015-06-23 19:41:02 +02:00
Christoph M. Becker
e1561c490e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  Fixed Bug #53823 (preg_replace: * qualifier on unicode replace garbles the string)
2015-06-23 19:32:57 +02:00
Christoph M. Becker
23e25f3319 Fixed Bug #53823 (preg_replace: * qualifier on unicode replace garbles the string)
When advancing after empty matches, php_pcre_match_impl() as well as
php_pcre_replace_impl() always have to advance to the next code point when the
u modifier is given, instead of to the next byte.
2015-06-23 19:28:09 +02:00
Christoph M. Becker
ec8731c46b Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #69864 (Segfault in preg_replace_callback)
2015-06-23 16:50:52 +02:00
Christoph M. Becker
bc47f10a97 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  Fixed bug #69864 (Segfault in preg_replace_callback)
2015-06-23 16:36:35 +02:00