Commit graph

903 commits

Author SHA1 Message Date
Bob Weinand
1a7bf16dd6 Ran wrong tests, fixed bug in impl; simplified 2015-05-26 01:43:56 +02:00
Bob Weinand
bb552908a0 Speed up implod()'ing between 5% and 30% (by time)
Significantly speed up implode()'ing on integers now...
Previously I accidentally committed the first part of the patch in 69b54ba926
2015-05-26 01:12:23 +02:00
Bob Weinand
69b54ba926 Also unreserve T_CLASS 2015-05-25 22:58:30 +02:00
Dmitry Stogov
a464045726 Improve strtr() 2015-05-15 04:03:30 +03:00
Stanislav Malyshev
587ddf6ddc Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	ext/standard/pack.c
2015-05-12 14:26:06 -07:00
Stanislav Malyshev
c08f9c2c78 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix format
  update NEWS
  Add test for bug #69522
  Update tests
  Fix bug #69522 - do not allow int overflow
  Forgot test file
  Fix bug #69403 and other int overflows
  Fixed bug #69418 - more s->p fixes for filenames
  Fixed bug #69364 - use smart_str to assemble strings
  Fix bug #69453 - don't try to cut empty string
  Fix bug #69545 - avoid overflow when reading list

Conflicts:
	ext/pcntl/pcntl.c
	ext/standard/basic_functions.c
	ext/standard/pack.c
	ext/standard/tests/dir/opendir_variation1-win32.phpt
2015-05-12 14:24:15 -07:00
Stanislav Malyshev
c591f022f8 Fix bug #69403 and other int overflows 2015-05-10 02:20:08 -07:00
Dmitry Stogov
b1d486c7d7 e more efficient zend_hash_*() functions 2015-05-05 16:20:29 +03:00
Nikita Popov
fc264da0e5 Cleanup substr_replace 2015-04-27 18:58:47 +02:00
Anatol Belski
6a1bf93ad9 fix compilation with vc14 2015-04-22 22:25:33 +02:00
Dmitry Stogov
d146d15003 Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate() 2015-03-20 02:02:42 +03:00
Dmitry Stogov
8633685675 Use specialized macro for string zval creation 2015-03-12 16:53:51 +03:00
Xinchen Hui
54e2020ee3 Fixed bug #69144 (strtr not replacing with partly matching replace pairs) 2015-02-28 22:37:46 +08:00
Anatol Belski
52f5cb914e fix incompatible pointer type 2015-02-11 12:03:35 +01:00
Dmitry Stogov
94602028f0 Get rid of old HashTable iteration API 2015-02-10 16:59:34 +03:00
Stanislav Malyshev
41bdd6e7cc Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Add mitigation for CVE-2015-0235 (bug #68925)
  Add mitigation for CVE-2015-0235 (bug #68925)
2015-01-31 19:12:20 -08:00
Stanislav Malyshev
882a375dba Add mitigation for CVE-2015-0235 (bug #68925) 2015-01-31 19:10:52 -08:00
Xinchen Hui
4f5d010269 Fixed segfault introduced in f869bf3829 2015-01-30 22:11:21 +08:00
Xinchen Hui
68f5eb7e71 minor CS fix 2015-01-27 20:35:25 +08:00
Márcio Almada
f869bf3829 fix failure with shared zvals in php_str_replace_in_subject 2015-01-27 07:16:22 -03:00
Márcio Almada
f27e96c2f8 remove unused var, make string.c compilation zero warnings 2015-01-24 00:26:01 -03:00
Reeze Xia
bdfe4d6558 Fix one more leak when wrong $needle type provide of strripos 2015-01-23 17:14:39 +08:00
Reeze Xia
d44b6e58ba Fixed memory leak of strripos() when empty needle or haystack 2015-01-23 16:53:58 +08:00
Xinchen Hui
6ae57df70b Revert "Fixed valgrind reported issue with setlocale"
This reverts commit fa06343d7e.
2015-01-22 16:55:20 +08:00
Xinchen Hui
fa06343d7e Fixed valgrind reported issue with setlocale 2015-01-21 12:03:19 +08:00
Anatol Belski
44cbba100a fix leaking of locale_string in TS build
actually more like an attempt as i see the leaks on travis,
but don't repro on my boxes
2015-01-20 20:52:44 +01:00
Anatol Belski
ea8415114a fix premature freeing of BG(locale_string)
the returned string has to be refcounted
2015-01-20 16:54:04 +01:00
Xinchen Hui
c369a03407 Use zend_string in case we will optimize them 2015-01-20 10:59:28 +08:00
Xinchen Hui
020610ee40 Remove addslashes_str 2015-01-20 10:11:48 +08:00
Xinchen Hui
da7d8f45b2 Optimized php_addslashes 2015-01-19 10:46:39 -05:00
Xinchen Hui
ac9a1a7b0c Optimized trim for what_len == 1 2015-01-19 07:45:30 -05:00
Xinchen Hui
0706032b73 Better fix 2015-01-18 21:38:25 -05:00
Xinchen Hui
f3052c5d2f Fixed bug #68852 (broken strrpos with negative offset) 2015-01-18 10:05:27 -05:00
Nikita Popov
4c115b6b71 Remove string category support in setlocale() 2015-01-17 18:26:45 +01:00
Rasmus Lerdorf
ff6b4ad8c7 FAST ZPP for strtok() and nl2br()
Looking at some template-driven code that calls these
hundreds of times per request
2015-01-17 08:30:40 -08:00
Xinchen Hui
4633a6f5d6 unused var 2015-01-16 12:18:59 +08:00
Xinchen Hui
e49f763482 unused variable 2015-01-16 12:16:44 +08:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Xinchen Hui
8a0bc38535 Merge branch 'zend_sort' of https://github.com/laruence/php-src 2015-01-14 22:15:41 -05:00
Dmitry Stogov
e0155d536f Avoid string reallocation in strtr() 2015-01-14 20:58:41 +03:00
Dmitry Stogov
588e803e85 Ipmrove strtr() by maintaining a set of characters that may start a matched pattern and avoid zend_hash_find() calls for other paterns. 2015-01-14 15:04:04 +03:00
Xinchen Hui
2193de0d18 Faster sorting algo 2015-01-14 18:02:41 +08:00
Dmitry Stogov
ade7a41040 Optimized str_[i]replace to aviod reallocations and repeatable conversions to lowercase 2015-01-13 23:23:50 +03:00
Dmitry Stogov
a7ce679578 Fixed type (case sensetive/insensetive mess) 2015-01-12 22:30:55 +03:00
Dmitry Stogov
c5047d1f11 Use FAST_ZPP in few more frequently used functions 2015-01-12 19:26:12 +03:00
Dmitry Stogov
8d2a7e98db Added special optimized cases when strtr() called with zero or one search/replace pair. 2015-01-12 16:51:59 +03:00
Xinchen Hui
2f1ddff2a5 Faster strrpos implementation 2015-01-12 17:24:37 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00