Xinchen Hui
c081ce628f
Bump year
2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772
Bump year
2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0
Bump year
2014-01-03 11:04:26 +08:00
Christopher Jones
3c166c4758
Merge branch 'PHP-5.5'
...
* PHP-5.5:
Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
Conflicts:
ext/gmp/gmp.c
2013-08-14 20:47:00 -07:00
Christopher Jones
39612afc72
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
Conflicts:
ext/dba/libinifile/inifile.c
2013-08-14 20:43:25 -07: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
Michael Wallner
14caf174ff
unify stdint type usage
...
if you need C99 stdint types, just include "php_stdint.h"
2013-08-06 22:49:56 +02:00
Veres Lajos
e9a95d78ef
typo fixes
2013-07-15 00:23:03 -07:00
Veres Lajos
1b06e0be96
typo fixes
2013-07-15 00:19:49 -07:00
Veres Lajos
72085b0e5f
typo fixes
2013-07-15 00:18:57 -07:00
Yasuo Ohgaki
bde0f1318a
Added warning for hex2bin() when input is invalid string
2013-07-08 19:14:45 +09:00
Xinchen Hui
b29a9fa75d
Merge branch 'PHP-5.4' into PHP-5.5
2013-03-21 11:14:36 +08:00
Xinchen Hui
0fd3572f4e
Fixed bug #64432 (more empty delimiter warning in strX methods)
2013-03-21 11:14:10 +08:00
Anatoliy Belsky
18e160411e
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
fixed build
NEWS for bug #63893
Conflicts:
NEWS
2013-01-15 22:39:49 +01:00
Anatoliy Belsky
9498cf6194
fixed build
2013-01-15 22:36:29 +01:00
Gustavo Lopes
88b82ae54d
Merge branch 'strtr_wu94_54' into strtr_wu94_55
2013-01-15 17:26:24 +01:00
Gustavo Lopes
930ef9ddd6
Fixed inconsequential bug in strtr()
2013-01-15 17:25:59 +01:00
Gustavo Lopes
22390d3393
Add zend_qsort_r & use it in strtr
2013-01-14 17:24:16 +01:00
Gustavo Lopes
1ce5a22589
Merge branch 'PHP-5.4' into PHP-5.5
...
Conflicts:
NEWS
2013-01-14 17:19:23 +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
6deb8361f3
Merge branch 'PHP-5.4' into PHP-5.5
2013-01-09 10:57:47 +08: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
a666285bc2
Happy New Year
2013-01-01 16:37:09 +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
01c3e0e62c
Merge branch 'PHP-5.4'
...
* PHP-5.4:
- Value stored to var is never used
2012-08-19 14:34:46 -03: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
Stanislav Malyshev
3b0573363a
fix comment
2012-07-14 14:50:50 -07:00
Stanislav Malyshev
582514d4c7
fix for bug#18556 - use simple tolower() function for internal things
2012-07-14 14:50:50 -07: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
Felipe Pena
bbf58f9234
- Fixed bug #53319 (strip_tags() may strip '<br />' incorrectly)
2010-11-16 22:16:44 +00:00
Felipe Pena
2e42d64007
- Fixed bug #53319 (strip_tags() may strip '<br />' incorrectly)
2010-11-16 22:16:44 +00:00
Ilia Alshanetsky
e4b1575d58
Fixed issues inside str_pad() identified by bug #52550
2010-08-06 19:55:10 +00:00
Ilia Alshanetsky
c0edb4afce
Fixed issues inside str_pad() identified by bug #52550
2010-08-06 19:55:10 +00:00
Ilia Alshanetsky
fa4bf064bd
Use correct order of operations. Second of many fixes for bug #52550
2010-08-06 19:11:34 +00:00
Ilia Alshanetsky
64ceec13f2
Use correct order of operations. Second of many fixes for bug #52550
2010-08-06 19:11:34 +00:00
Adam Harvey
3aceb07efd
MFH: fix bug #52380 (Typo in lcfirst comment docs).
2010-07-23 09:02:14 +00:00
Adam Harvey
929eec3b93
Fix bug #52380 (Typo in lcfirst comment docs) by updating the commented
...
prototype for lcfirst() to actually read lcfirst().
2010-07-20 04:26:57 +00:00
Rasmus Lerdorf
a259f797bf
vim fail
2010-06-02 19:26:10 +00:00
Rasmus Lerdorf
2c9ec4c22f
vim fail
2010-06-02 19:26:10 +00:00
Rasmus Lerdorf
6ba6263817
Tweak the fix for bug #51847 to still call libintl_setlocale
...
when libintl has done that redefine.
2010-06-02 19:24:36 +00:00
Rasmus Lerdorf
2c342f16c1
Tweak the fix for bug #51847 to still call libintl_setlocale
...
when libintl has done that redefine.
2010-06-02 19:24:36 +00:00
Rasmus Lerdorf
d4cca6da93
Fix for bug #51847
...
Someone in libintl world decided it was a good idea to do:
#undef setlocale
#define setlocale libintl_setlocale
That means, of course, that any use of "setlocale" by the
preprocessor now becomes libintl_setlocale which means we
no longer have a _zif_setlocale symbol in string.o, but we
magically have a _zif_libintl_setlocale symbol. The linker
is obviously not very happy about this when basic_functions.o
tries to find _zif_setlocale.
So, let's not do that again.
2010-06-02 05:53:13 +00:00
Rasmus Lerdorf
3f602cf510
Fix for bug #51847
...
Someone in libintl world decided it was a good idea to do:
#undef setlocale
#define setlocale libintl_setlocale
That means, of course, that any use of "setlocale" by the
preprocessor now becomes libintl_setlocale which means we
no longer have a _zif_setlocale symbol in string.o, but we
magically have a _zif_libintl_setlocale symbol. The linker
is obviously not very happy about this when basic_functions.o
tries to find _zif_setlocale.
So, let's not do that again.
2010-06-02 05:53:13 +00:00
Dmitry Stogov
24a1dbabc8
Fixed a possible memory corruption in parse_str(). Reported by Stefan Esser
2010-05-12 11:32:25 +00:00
Dmitry Stogov
214d3bc248
Fixed a possible memory corruption in parse_str(). Reported by Stefan Esser
2010-05-12 11:32:25 +00:00
Dmitry Stogov
2c5fecfeb4
Fixed a possible memory corruption in substr_replace()
2010-05-11 11:59:13 +00:00
Dmitry Stogov
57f8649eac
Fixed a possible memory corruption in substr_replace()
2010-05-11 11:59:13 +00:00
Dmitry Stogov
dd5c478be6
Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed.
2010-04-20 11:05:54 +00:00
Ilia Alshanetsky
b0f76c2534
Fixed bug #50847 (strip_tags() removes all tags greater then 1023 bytes long)
2010-02-01 12:59:08 +00:00
Sebastian Bergmann
9ba1e81665
sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
2010-01-03 09:23:27 +00:00
Ilia Alshanetsky
800519fcbb
Fixed bug #45599 (strip_tags() truncates rest of string with invalid attribute).
2009-12-22 02:04:12 +00:00
Felipe Pena
a94558c855
- Added MAKE_COPY_ZVAL(ppzv, pzv) macro
2009-12-08 01:57:37 +00:00
Scott MacVicar
065167bdae
Fix a typo
2009-11-06 09:02:52 +00:00
Ilia Alshanetsky
6a73387877
Fixed bug #49361 (wordwrap() wraps incorrectly on end of line boundaries).
2009-08-31 12:28:46 +00:00
Felipe Pena
a8604e2c20
- Fix ZTS build
2009-08-13 20:10:18 +00:00
Stanislav Malyshev
e52517d610
standardise and clean up string functions parameter parsing
2009-08-13 06:44:50 +00:00
Jani Taskinen
2539da79ba
- HEAD and PHP_5_2 have it like this, PHP_5_3 should not be different!
2009-07-27 09:23:06 +00:00
Kalle Sommer Nielsen
82cfb15677
Fixed bug #48872 (string.c: errors: duplicate case values) (Only in PHP_5_3)
2009-07-27 07:14:40 +00:00
Matt Wilmas
c27bf17f63
MFH: explode() stuff:
...
- Fixed bug #47560 (explode()'s limit parameter odd behaviour) by reverting change for bug #47546
- Changed int to long where needed (should fix memory errors from overflow seen in bug #47854 )
- Simplified logic a bit with limit and its default value
- php_explode_negative_limit(): removed safe_emalloc (not needed; plain erealloc is used later)
- Moved declarations/allocation to optimize if the delimiter isn't found
- Changed ALLOC_STEP size for less realloc's (and maybe better memory block alignment?)
2009-04-01 17:05:36 +00:00
Ilia Alshanetsky
e1cb53f5ec
Fixed bug #47856 (stristr() converts needle to lower-case).
2009-04-01 14:00:38 +00:00
Matt Wilmas
7f373057ef
Removed unneeded HashPosition variable (php_implode() doesn't change the internal pointer)
...
- It was added in '06 with the "200-300%" implode() optimization (hasn't been merged to HEAD)
2009-03-17 00:02:39 +00:00
Kalle Sommer Nielsen
627caefc4d
MFH: Fixed bug #47546 (Default value for limit parameter in explode is 0, not -1)
2009-03-03 11:47:31 +00:00
Moriyoshi Koizumi
3a9a83e7bc
- MFH: These should be E_WARNING for consistency with strpos()
2009-02-14 06:59:55 +00:00
Ilia Alshanetsky
a820c7c568
Improved validation checks inside str_pad()
2009-01-30 00:16:27 +00:00
Sebastian Bergmann
08659c2dcd
MFH: Bump copyright year, 3 of 3.
2008-12-31 11:15:49 +00:00
Brian Shire
b4141cc424
MFH: fix explode behavior to respect negative limit when string is empty.
2008-12-27 05:15:51 +00:00
Felipe Pena
b4150fdc3f
- MFH: Fixed bug #46578 (strip_tags() does not honor end-of-comment when it encounters a single quote)
2008-11-21 19:16:50 +00:00
Felipe Pena
8f12025b21
- MFH: Added str_getcsv()
2008-11-02 18:24:34 +00:00
Arnaud Le Blanc
d69dfa4b9f
MFH: initialize optional vars
2008-10-21 22:08:38 +00:00
Felipe Pena
0dbc79339c
- New parameter parsing API (zend_get_parameters_array_ex--)
...
- Fixed tests
2008-08-16 21:32:41 +00:00
Kalle Sommer Nielsen
fcf11ba65e
MFH: Implemented feature request #34381 (nl2br() should have an option for XHTML/HTML compatible BR element)
2008-08-14 02:56:23 +00:00
Olivier Hill
d247a23188
Fix regression issue
2008-07-31 14:20:40 +00:00
Scott MacVicar
6c48a01f40
MFH: Fix integer oveflow in strrpos()
2008-07-22 01:10:58 +00:00
Scott MacVicar
a9d60c014b
MFH: Fix bug when < is used within attribute.
2008-07-15 14:46:12 +00:00
Felipe Pena
8ea5ae6c9a
- MFB: Fixed bug #45485 (strip_tags and <?XML tag)
2008-07-11 12:25:38 +00:00
Antony Dovgal
b691365e7b
size_t -> int
2008-07-03 14:00:20 +00:00
Felipe Pena
2a35fb373f
- Removed unused variables
2008-07-01 11:27:05 +00:00
Antony Dovgal
c125461de1
"l" is long, that's why it is "l", not "i"
2008-06-30 10:39:34 +00:00
Antony Dovgal
b763c47e4e
int -> long
2008-06-30 10:10:44 +00:00
Olivier Hill
c5ec48e858
New parameter parsing API
2008-06-25 12:16:17 +00:00
Dmitry Stogov
273ee49acb
Fixed strtolower/strtoupper to not modify the passed argument
2008-06-24 06:07:08 +00:00
Olivier Hill
906b5b80df
New parameter parsing API for string, part I
2008-06-22 19:22:41 +00:00
Matt Wilmas
7da75d81e7
MFH: Add array_init_size() and use it where array size is known at initialization
2008-05-27 10:29:33 +00:00
Scott MacVicar
96a20f9aed
MFH: Fix compile error if _GNU_SOURCE is defined
2008-05-09 12:59:16 +00:00
Dmitry Stogov
2ecf4bb0a7
Lazy EG(active_symbol_table) initialization
2008-04-29 08:15:20 +00:00
Felipe Pena
84a8bb038a
MFH: New way for check void parameters
2008-03-10 22:15:36 +00:00
Marcus Boerger
d3e5026564
- MFH Add E_DEPRECATED (Lars Strojny, Felipe Pena, Marcus)
...
[DOC] Finally added deprecation messages
2008-02-23 17:06:22 +00:00
Etienne Kneuss
12bd169f24
MFH: Fix inconcistencies between substr and substr_compare
2008-02-13 17:02:16 +00:00
Stanislav Malyshev
fd597dce1b
[DOC] Add compile-time __DIR__ constant which implements dirname(__FILE__)
2008-02-12 00:21:15 +00:00
Felipe Pena
e2c7b27130
Fixed reference problem (variable were converted)
2008-02-03 14:30:25 +00:00
Felipe Pena
79cfa91a43
MFH: New parameter 'before_needle'
2008-02-01 12:28:44 +00:00
Ilia Alshanetsky
1a7b75eb11
Adjust new chr() param handling to address chr("") calls
2008-01-25 01:31:10 +00:00
Ilia Alshanetsky
2be1ae5415
use new param parsing API
2008-01-22 01:34:24 +00:00
David Coallier
a3c09d611c
- MFH (lcfirst())
...
- Initial test for lcfirst
2008-01-19 19:27:22 +00:00
Antony Dovgal
20b021b209
MFH: fix #43863 (str_word_count() breaks on cyrillic "ya" in locale cp1251)
...
patch by phprus at gmail dot com
2008-01-16 08:34:33 +00:00
David Coallier
d6806d5ead
- MFH
...
- Making sure this is also using the good zend parsing and added
the php_ucfirst function
2008-01-16 03:11:26 +00:00
Sebastian Bergmann
d1dded8751
MFH: Bump copyright year, 2 of 2.
2007-12-31 07:17:19 +00:00
Dmitry Stogov
ed5a424b4f
Additional fix for bug #42868
2007-12-24 18:09:50 +00:00
Antony Dovgal
fc78e491b4
MFH: add workaround for glibc issue
2007-12-13 22:29:48 +00:00
Yiduo (David) Wang
4b4d634cb9
MFH: Added macros for managing zval refcounts and is_ref statuses
2007-10-07 05:22:07 +00:00
Jani Taskinen
aa3eee1dce
MFH:- Moved the old regex functions to own extension: ereg
2007-10-05 15:00:09 +00:00
Jani Taskinen
25be330cd0
- ws + cs + sync HEAD
2007-10-01 13:38:14 +00:00
Jani Taskinen
b34fcd4791
MFH: Fixed bug #42789
2007-10-01 12:05:41 +00:00
Jani Taskinen
adae5131f3
- Nuked ending dots from error messages
2007-09-30 05:40:23 +00:00
Pierre Joye
793956a0e1
- #42592 , remove ending dot in warning msg
2007-09-07 18:23:58 +00:00
Ilia Alshanetsky
022d4fc0b6
Added missing safety checks for 2nd parameter of setlocale() function
2007-09-07 02:28:42 +00:00
Ilia Alshanetsky
cd32b4e2bb
Fixed bug #42208 (substr_replace() crashes when the same array is passed
...
more than once)
2007-08-05 14:47:42 +00:00
Ilia Alshanetsky
f8217712a4
Fixed bug #42142 (substr_replace() returns FALSE when length > string
...
length).
[doc] Adjust length validation check inside substr_replace() to be similar
to that inside substr() so that excessive length is truncated to string
length.
2007-07-30 14:22:06 +00:00
Jani Taskinen
e8fcd7477c
MFH: Fixed str_pad() when passed huge negative pad length.
2007-07-23 13:27:59 +00:00
Ilia Alshanetsky
3fea65b0dc
Fixed "Floating point exception" inside wordwrap()
2007-07-22 15:55:16 +00:00
Antony Dovgal
2041566a12
MFH
2007-06-06 21:53:54 +00:00
Stanislav Malyshev
d114d0b0c8
fix the chunks fix
2007-06-06 18:15:41 +00:00
Stanislav Malyshev
29b9d79c2f
Fix chunk_split fix - avoid using floats
...
Fix money_format - don't give strfmon more arguments then supplied
Fix str[c]spn integer overflow
2007-06-06 17:59:07 +00:00
Antony Dovgal
ceef5840ad
fix folding
2007-06-05 13:35:26 +00:00
Ilia Alshanetsky
405a15043f
Corrected fix for CVE-2007-2872
2007-06-03 18:47:10 +00:00
Ilia Alshanetsky
9282d4add6
Fixed an interger overflow inside chunk_split(), identified by Gerhard
...
Wagner
2007-05-30 00:33:13 +00:00
Rasmus Lerdorf
2fba3bf13b
Uh, only meant to remove the null check, not the assignment
2007-05-24 21:29:27 +00:00
Rasmus Lerdorf
61b06f1527
Avoid running off the end of a non-null terminated string. Not that we
...
should have any of those, but a mistake in an extension could hit this
and the check doesn't actually make any sense as far as I am concerned.
2007-05-24 20:53:05 +00:00
Antony Dovgal
8de1ecef64
MFH: fix segfault in strripos() when offset == INT_MAX+1
...
identified and repoted by Joxean Koret
2007-05-10 22:10:43 +00:00
Antony Dovgal
7053b89072
MFH: fix #40915 (addcslashes unexpected behavior with binary input)
2007-03-26 10:25:41 +00:00
Antony Dovgal
81f99c721b
return false instead of empty string when -length is greater than (len - offset)
2007-03-12 23:42:26 +00:00
Ilia Alshanetsky
e82c30c845
Re-added check removed by the previous patch
2007-03-10 20:07:50 +00:00
Antony Dovgal
982de65f6e
fix substr()
...
it's perfectly legal to do substr("str", 0, 1000000);
2007-03-09 10:04:59 +00:00
Ilia Alshanetsky
02fae929af
Fixed bug #40754 (added substr() & substr_replace() overflow checks).
2007-03-09 01:58:34 +00:00
Stanislav Malyshev
79195bfe2e
clarify checks and error messages
2007-03-08 00:47:04 +00:00
Ilia Alshanetsky
8696c9bc89
Improved length parameter validation
2007-03-08 00:18:10 +00:00
Ilia Alshanetsky
42ff70ede8
Improved offset validation
2007-03-08 00:06:41 +00:00
Stanislav Malyshev
2625be4ed0
fix MOPB#14
...
# The error message seems wrong, so maybe better fix is needed
2007-03-07 18:15:46 +00:00
Ilia Alshanetsky
e769e1b49e
Fixed bug #40704 (strip_tags() does not handle single quotes correctly)
2007-03-03 15:46:29 +00:00
Ilia Alshanetsky
efad70c2cc
snprintf() -> slprintf()
2007-02-27 03:28:17 +00:00
Ilia Alshanetsky
1d08a8d157
Fixed bug #40637 (Regression in strip_tags() in relation so quote handling)
2007-02-27 00:15:21 +00:00
Marcus Boerger
50ea26760d
- Avoid sprintf, even when checked copy'n'paste or changes lead to errors
2007-02-24 02:17:47 +00:00
Ilia Alshanetsky
fc49f98e6a
Make sure p is not pointing to the start of the buffer
2007-02-13 23:55:20 +00:00
Ilia Alshanetsky
103b8c33c0
Fixed bug #40432 (strip_tags() fails with greater than in attribute).
2007-02-13 02:16:22 +00:00
Antony Dovgal
7b12fd5492
MFH
2007-02-10 00:50:38 +00:00
Antony Dovgal
82f70c9493
fix leaks on error
2007-02-01 13:45:25 +00:00
Ilia Alshanetsky
60e20922eb
Use safe_emalloc() rather then emalloc()
2007-01-08 14:24:59 +00:00
Sebastian Bergmann
4223aa4d5e
MFH: Bump year.
2007-01-01 09:36:18 +00:00
Antony Dovgal
0abe62e027
MFH
2006-12-20 23:36:56 +00:00
Antony Dovgal
a0e2ccf490
MFH
2006-12-20 23:30:30 +00:00
Ilia Alshanetsky
090e14dfda
Less hackish support for spaces at the start of tags within strip_tags()
2006-12-18 15:02:16 +00:00
Ilia Alshanetsky
7d7248390c
Filter fixes:
...
Fixed possible double encoding problem with sanitizing filters
Make use of space-strict strip_tags() function
2006-12-18 04:22:05 +00:00
Ilia Alshanetsky
563221783a
Removed deadcode found by Ron Korving
2006-12-13 15:39:12 +00:00
Stanislav Malyshev
6b651f8e60
Improve tolower()-related functions on Windows and VC2005 by caching locale and using
...
tolower_l function.
# Gives 10-18% speedup on bench.php
# Does not change behaviour for non-windows
2006-12-04 18:37:15 +00:00
Antony Dovgal
93fc85b2af
MFH: fix #39621 (str_replace() is not binary safe on strings with equal length)
2006-11-24 21:59:09 +00:00
Ilia Alshanetsky
07cdfefdee
Fixed bug #39350 (crash with implode("\n", array(false))).
2006-11-06 17:21:05 +00:00
Ilia Alshanetsky
a39201675f
Catch empty strings right away.
2006-10-11 14:19:55 +00:00
Antony Dovgal
9b7ba01618
MFH: avoid reading str[-1], add warning when invalid format specified
...
add test
2006-10-11 13:15:30 +00:00
Andrei Zmievski
e779c3aa36
Increment replace count value for case-sensitive single char searches.
2006-10-05 18:23:19 +00:00
Antony Dovgal
d8648eae57
MFH: fix #39032 (strcspn() stops on null character)
2006-10-04 11:14:32 +00:00
Ilia Alshanetsky
8581c7328f
optimize zend_hash_init() with known hash table sizes.
2006-10-03 17:41:47 +00:00
Andrei Zmievski
5c96544b7d
Use php_error_docref() instead.
2006-10-02 20:07:14 +00:00
Andrei Zmievski
007c6ff8d9
More offset fixes. Added E_NOTICE where appropriate.
2006-10-02 19:58:15 +00:00
Andrei Zmievski
c36d94aac2
Fix invalid memory access in strrpos().
2006-10-02 19:42:42 +00:00
Antony Dovgal
0c482b5c64
more z/Z fixes
2006-08-31 14:21:21 +00:00
Ilia Alshanetsky
1b9e18d471
Corrected problems introduced by previous commit.
...
# Issue found by Stefan
2006-08-29 19:50:04 +00:00
Ilia Alshanetsky
7c618c40bc
Finalize implode() patch
2006-08-29 14:32:16 +00:00
Antony Dovgal
ffc3d4a076
fix win32 build
...
EG(precision) can be changed in runtime, even in php_implode() (hint: __toString()), so please think twice before optimizing
2006-08-29 12:20:18 +00:00
Ilia Alshanetsky
914d362176
Adjust code to avoid TSRMLS_FETCH
2006-08-28 23:33:37 +00:00
Antony Dovgal
615f2d7295
fix ZTS build
2006-08-28 09:56:28 +00:00
Ilia Alshanetsky
78d7b0bf0e
Optimize the operation of implode() on non-string parameters
2006-08-27 19:06:09 +00:00
Antony Dovgal
d5c9b41db1
fix implode() function (see http://news.php.net/php.qa/26876 )
...
add test
2006-08-22 19:55:56 +00:00
Ilia Alshanetsky
a4d2f04307
Fixed overflow on 64bit systems in str_repeat() and wordwrap().
...
Disabled CURLOPT_FOLLOWLOCATION in curl when open_basedir or safe_mode are
enabled.
# Patches by Stefan E.
2006-08-10 14:40:13 +00:00
Antony Dovgal
1a4b715ef2
use memrchr/zend_memrchr instead of strrchr
2006-08-08 10:22:25 +00:00
Antony Dovgal
a28a95c11a
MFH: patch for #37846 (wordwrap() wraps incorrectly)
...
by Dmitry Kononov <ddk at krasn dot ru>
2006-07-28 12:23:18 +00:00
Michael Wallner
c0fcaa7acb
- fix bug #37945 pathinfo() cannot handle argument with special characters
...
like german "Umlaute"
2006-07-17 20:36:47 +00:00