Commit graph

903 commits

Author SHA1 Message Date
Xinchen Hui
e95782ed5e Fixed bug #71969 (str_replace returns an incorrect resulting array after a foreach by reference) 2016-04-06 10:19:24 +08:00
Joe Watkins
034e8ec02e fix #71287 (substr_replace bug when length type is string) 2016-03-31 17:10:12 +01:00
Stanislav Malyshev
57b997ebf9 Fix bug #71637: Multiple Heap Overflow due to integer overflows 2016-02-21 23:14:29 -08:00
Nikita Popov
f43fe8cb4c Merge branch 'PHP-5.6' into PHP-7.0 2016-02-13 17:48:17 +01:00
Nikita Popov
4e0134c661 Fix bounds check in strip_tags() 2016-02-13 17:47:30 +01:00
Julien Pauli
0d1d814e1a Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Updated NEWS
  Fix #70720

Conflicts:
	ext/standard/string.c
	ext/standard/tests/strings/bug70720.phpt
2016-02-02 18:17:16 +01:00
Julien Pauli
6b0b29edd6 Fix #70720 2016-02-02 18:09:54 +01:00
Stanislav Malyshev
c631f1ee2b Merge branch 'PHP-7.0.3' into PHP-7.0
* PHP-7.0.3: (35 commits)
  fix tests
  update NEWS
  fix tests
  fix NEWS
  Update NEWS
  update NEWS
  Fixed bug #71475: openssl_seal() uninitialized memory usage
  Fixed bug #71488: Stack overflow when decompressing tar archives
  fix tests
  fix wrong gc sequence
  revert the API string as well
  update NEWS
  Revert "Fix #70720"
  sync NEWS
  reset ext/session to the state of 7.0.2
  update NEWS
  update NEWS
  add missing headers for SIZE_MAX
  backport the escapeshell* functions hardening branch
  add tests
  ...

Conflicts:
	configure.in
	ext/session/tests/bug69111.phpt
	main/php_version.h
2016-02-01 20:45:49 -08:00
Anatol Belski
47af41b785 Revert "Fix #70720"
This reverts commit ff7ed9021c.
2016-01-29 12:41:43 +01:00
Stanislav Malyshev
88bd7cb418 Use safe alloc functions when calculations are made on sizes.
Fixes bug #71449, bug #71450
2016-01-26 22:33:51 -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
Julien Pauli
332b778d68 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix #70720
  Align NEWS entry format
2015-12-22 16:26:30 +01:00
Julien Pauli
ff7ed9021c Fix #70720 2015-12-22 16:25:51 +01:00
Anatol Belski
4037ba5847 release only appropriate string 2015-12-22 14:33:19 +01:00
Xinchen Hui
d63ae2c382 Fixed bug #71190 (substr_replace converts integers in original $search array to strings) 2015-12-22 12:13:28 +08:00
Xinchen Hui
3524849f77 Fixed #71188 (str_replace converts integers in original $search array to strings) 2015-12-22 11:07:30 +08:00
Dmitry Stogov
9af07e7119 Fixed bug #70667 (strtr() causes invalid writes and a crashes) 2015-10-08 14:30:43 +03:00
Dmitry Stogov
560e4fa393 Removed or simplified incorrect SEPARATE_*() macros usage. 2015-09-29 11:17:43 +03:00
Dmitry Stogov
ad4fa8f758 Fixed incorrect usage of HASH_OF() macro. Replaced HASH_OF() with more appropriate Z_ARRVAL_P() or Z_OBJPROP_P(). 2015-09-24 22:39:59 +03:00
Bob Weinand
ad4d139f29 Make bin2hex() and hex2bin() timing safe 2015-08-04 22:07:13 +02:00
Remi Collet
80edd40383 fix memleak 2015-07-27 16:57:38 +02:00
Xinchen Hui
11613a1b58 Cleanup and also include the error path into test 2015-07-27 22:22:13 +08:00
Remi Collet
e811770a68 Fix #70112 RFE Allow dirname to go up various times 2015-07-27 15:23:04 +02:00
Xinchen Hui
6aeee47b2c Fixed bug #70140 (str_ireplace/php_string_tolower - Arbitrary Code Execution) 2015-07-27 11:17:05 +08:00
Nikita Popov
42e32c33e2 More warning fixes 2015-07-17 21:12:15 +02:00
Ferenc Kovacs
df499b9108 Merge branch 'PHP-5.6'
* PHP-5.6:
  add missing second argument for ucfirst to the proto
2015-07-07 15:50:02 +02:00
Ferenc Kovacs
bdb9c0da86 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  add missing second argument for ucfirst to the proto
2015-07-07 15:49:44 +02:00
Ferenc Kovacs
b6f5cb11a4 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  add missing second argument for ucfirst to the proto
2015-07-07 15:49:16 +02:00
Ferenc Kovacs
29533ae528 add missing second argument for ucfirst to the proto 2015-07-07 15:48:55 +02:00
Xinchen Hui
017d3530f3 Unnecessary duplication 2015-07-02 11:47:22 +08:00
Dmitry Stogov
d2d326a381 Cleanup (avoid reallocatios and side effects in php_strip_tags) 2015-07-01 19:04:18 +03: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
Anatol Belski
845b191f16 refix the negative zend_long to size_t casts
There is no good way to fix this for 32-bit without enormously
overcomplicating the logic. Therefore switching back to the previous
code and adding the casts to ensure there are no sudden casts of
negative to size_t.
2015-06-29 20:41:39 +02: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
Anatol Belski
c783645b99 fix more places with subtle negative zend_long to size_t cast 2015-06-29 12:15:21 +02:00
Anatol Belski
c2ac0304a9 remove useless check
thanks Yasuo :)
2015-06-29 12:15:20 +02:00
Anatol Belski
8ccf29eb04 remove comment
f and l are the $start and $length, since they come from the user
land, they only can be zend_long
2015-06-29 12:15:19 +02:00
Anatol Belski
5060060317 fix negative zend_long to size_t cast 2015-06-29 10:27:42 +02:00
Edgar R. Sandi
8271890d8d removed unreachable code in the substr_replace function 2015-06-29 10:27:41 +02:00
Xinchen Hui
fa61f921f9 Micro optimization 2015-06-24 21:42:54 +08:00
Rasmus Lerdorf
28d7bb97a1 Fix more proto comments 2015-06-23 17:46:20 -04:00
Dmitry Stogov
6bf3ecf69a Revert "Simplify php_implode(). Fill the resulting string in direct order."
The patch slightly improved performance of string imploding, but reduced speed of integers imploding.

This reverts commit 36d39b7044.
2015-06-23 16:46:41 +03:00
Dmitry Stogov
36d39b7044 Simplify php_implode(). Fill the resulting string in direct order. 2015-06-23 12:57:36 +03:00
Nikita Popov
257054e81d Fix bug #62922
Off by one error...
2015-06-20 14:39:55 +02:00
Xinchen Hui
dc72b70b7e Remove unused var 2015-06-20 10:37:53 +08:00
Xinchen Hui
a7635e82f6 Improve strtr (Fixed a bug which the lenth check doesn't work at all) 2015-06-19 22:59:31 +08:00
Xinchen Hui
20f3416682 Fixed bug #69872 (uninitialised value in strtr with array) 2015-06-18 22:28:29 +08:00
Dmitry Stogov
1c754f0b71 Get rid of more ZVAL_ZVAL() macros 2015-06-12 13:33:14 +03:00
Dmitry Stogov
8e10e8f921 Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
2015-06-12 12:33:23 +03:00