Stanislav Malyshev
c591f022f8
Fix bug #69403 and other int overflows
2015-05-10 02:20:08 -07:00
Tjerk Meesters
4fc0d46ae7
Fix for bug #34407 - ucwords and title case
...
Added support for ranges like trim() has
2014-07-12 10:44:11 +08:00
Nikita Popov
3cc6bd10ac
Fix bug #67151 : strtr with empty array crashes
2014-07-02 22:33:20 +02:00
Anatol Belski
3f7f72adb2
improved the fix for bug #66395
...
- fixed the traverse vulnerability in case like c:d:file.txt
- ensure paths containing NTFS streams are still worky
2014-01-05 19:05:04 +01:00
Anatol Belski
46f60fae22
Fixed bug #66395 basename function doesn't remove drive letter
2014-01-03 22:25:58 +01:00
Xinchen Hui
c0d060f5c0
Bump year
2014-01-03 11:04:26 +08:00
Christopher Jones
9ad97cd489
Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
2013-08-14 20:36:50 -07:00
Veres Lajos
e9a95d78ef
typo fixes
2013-07-15 00:23:03 -07:00
Xinchen Hui
0fd3572f4e
Fixed bug #64432 (more empty delimiter warning in strX methods)
2013-03-21 11:14:10 +08:00
Anatoliy Belsky
9498cf6194
fixed build
2013-01-15 22:36:29 +01:00
Gustavo Lopes
930ef9ddd6
Fixed inconsequential bug in strtr()
2013-01-15 17:25:59 +01:00
Gustavo Lopes
d7bac4f5ba
Remove _GNU_SOURCE, add local heap sort
2013-01-14 17:06:52 +01:00
Gustavo Lopes
e5029ac40b
The compiler can figure this out
2013-01-14 12:22:42 +01:00
Gustavo Lopes
93d1171c47
Remove unused block
2013-01-14 12:22:42 +01:00
Gustavo Lopes
cddbb98ada
strtr() with 2nd param array - optimization
...
About a 1.25x speedup in my test script by writing the result string
only when a match is found and at the end instead of on each iteration.
2013-01-14 12:22:42 +01:00
Gustavo Lopes
2111ee3df5
Refactoring, bugs & leaks
2013-01-14 12:22:41 +01:00
Gustavo Lopes
ccf15cf2dc
Optimize strtr w/ 2nd arg array
...
Fixes bug #63893 : poor efficiency of strtr() using array with keys of
very different length.
The implementation is basically all new, which carries some risk with
it.
The algorithm is described in "A Fast Algorithm For Multi-Pattern
Searching" (1994) by Sun Wu and Udi Manber.
2013-01-14 12:22:41 +01:00
Xinchen Hui
15aaa9c660
Merge branch 'PHP-5.3' into PHP-5.4
2013-01-09 10:54:23 +08:00
Xinchen Hui
c05ee74e7f
Fixed bug #63943 (Bad warning text from strpos() on empty needle)
2013-01-09 10:53:20 +08:00
Xinchen Hui
0a7395e009
Happy New Year
2013-01-01 16:28:54 +08:00
Xinchen Hui
a2045ff332
Happy New Year~
2013-01-01 16:02:16 +08:00
Felipe Pena
9d8d84ebdf
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
- Value stored to var is never used
2012-08-19 14:34:42 -03:00
Felipe Pena
50ab6c63a7
- Value stored to var is never used
2012-08-19 14:34:38 -03:00
Nikita Popov
5cf2f87fa7
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
Fix potential integer overflow in nl2br
Fix potential integer overflow in bin2hex
Conflicts:
ext/standard/string.c
2012-07-05 20:59:18 +02:00
Nikita Popov
157ddd9577
Fix potential integer overflow in nl2br
...
The buffer size was calculated manually, thus creating integer overflows
for very large inputs, e.g. nl2br(str_repeat("\n", 613566757)).
The code now uses safe_emalloc, thus making the code throw an error
instead of crashing.
2012-07-05 20:41:54 +02:00
Nikita Popov
88f46b162b
Fix potential integer overflow in bin2hex
...
The code was already using safe_emalloc but did the multiplication in
the first argument, thus making the use of safe_emalloc pretty useless.
The *2 is now moved to the second argument.
2012-07-05 20:14:49 +02:00
Nikita Popov
7ae93a2c4c
Fix bug #61660 : bin2hex(hex2bin($data)) != $data
...
If the input data has an odd length a warning is thrown and false is returned.
2012-04-08 22:38:21 +02:00
Adam Harvey
03f3d03ce0
MFH: Fix bug #60801 (strpbrk() mishandles NUL byte). (Trunk commit: r322934).
2012-03-02 03:39:04 +00:00
Adam Harvey
4fc6861030
MFH: Fix bug #60801 (strpbrk() mishandles NUL byte). (Trunk commit: r322934).
2012-03-02 03:39:04 +00:00
Pierrick Charron
d102030b00
Fixed memory leak in substr_replace
2012-03-01 15:10:29 +00:00
Stanislav Malyshev
cbcddcb02e
fix bug #55871 - Interruption in substr_replace()
2012-01-02 00:47:57 +00:00
Felipe Pena
e4ca0ed09f
- Year++
2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281
- Year++
2012-01-01 13:15:04 +00:00
Dmitry Stogov
4a25a7740d
Fixed ZE specific compile warnings (Bug #55629 )
2011-09-13 13:29:35 +00:00
Arpad Ray
a6a08dc322
Fixed bug #55366 : keys lost when using substr_replace an array
2011-08-29 21:35:28 +00:00
Arpad Ray
0e3b5b137c
Fixed bug #55366 : keys lost when using substr_replace an array
2011-08-29 20:38:52 +00:00
Arpad Ray
b52256c5be
add support for SORT_NATURAL and SORT_FLAG_CASE in array sort functions
2011-08-29 20:23:34 +00:00
Pierre Joye
9805e1674a
- remove magic quotes support, functions are kept (see the NEWS entry for the details) for BC reasons but do not allow to set enable MQ
2011-07-22 11:25:30 +00:00
Scott MacVicar
76cbcc7f66
Added fabled hex2bin() function
2011-06-03 00:12:22 +00:00
Rasmus Lerdorf
a5eeecb13f
Suppress a dozen unused return value warnings in places where the return
...
value is really not useful to us.
2011-05-16 17:22:41 +00:00
Pierrick Charron
1153eaf505
Revert bug #54454 fix from PHP_5_3 branch to avoid BC break in minor release
2011-04-21 01:51:24 +00:00
Felipe Pena
07f60310b2
- Remove undesired line (reported by Gökhan Özbulak)
2011-04-13 13:38:52 +00:00
Felipe Pena
782c00d744
- Remove undesired line (reported by Gökhan Özbulak)
2011-04-13 13:38:52 +00:00
Stanislav Malyshev
c4a8866abb
fix bug #54238 (use-after-free in substr_replace())
2011-04-13 06:32:41 +00:00
Stanislav Malyshev
2e206e0761
fix bug #54238 (use-after-free in substr_replace())
2011-04-13 06:32:41 +00:00
Pierrick Charron
4919f3286b
Fixed bug #54454 (substr_compare incorrectly reports equality in some cases)
2011-04-03 07:18:27 +00:00
Pierrick Charron
5a8c917c37
Fixed bug #54454 (substr_compare incorrectly reports equality in some cases)
2011-04-03 07:18:27 +00:00
Felipe Pena
927bf09c29
- Year++
2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44
- Year++
2011-01-01 02:17:06 +00:00
Kalle Sommer Nielsen
1fed0e5a84
Kill some more constness warnings in com_dotnet/phar/standard
2010-11-19 16:03:00 +00:00