Commit Graph

522 Commits

Author SHA1 Message Date
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