Thomas Punt
c37890062d
Remove useless check in substr()
...
This check (if the start position is greater than the string length) is already performed on line 2399
2015-11-11 22:13:57 +00: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
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