Commit Graph

65 Commits

Author SHA1 Message Date
Stanislav Malyshev
9d7c5dbed9 secured unserialize
- update for BC-compatible unserialize
- add tests
2014-11-22 22:25:18 -08:00
Nikita Popov
8be73f2650 Fix tests/serialize/bug64146.phpt
The var hash now retains a reference to its elements, to ensure
that addresses are not reused.

Furthermore the var hash now only stores objects and references
and directly uses their pointer as key, thus making serialization
about two times faster.
2014-09-22 23:48:31 +02:00
Nikita Popov
483697617f Remove php_varname_check
This is a leftover from PHP < 5.4.

Also removed the php_create_empty_class declaration, which no longer
exists.
2014-09-22 18:34:40 +02:00
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Dmitry Stogov
72c287bd23 Combine HashTable.flags and HashTable.nApplyCount into single 32-bit word 2014-04-21 18:25:34 +04:00
Dmitry Stogov
6bfedfd22e Fixed unserialize() 2014-04-10 18:08:11 +04:00
Xinchen Hui
24540362b0 Re-fixed unserialize 2014-02-26 15:51:53 +08:00
Xinchen Hui
b7052ef16d Revert "Fixed unserialize implementation (it's complicated, this issue took me 4 hours :<, need some review)"
This reverts commit 80a178015d.
2014-02-26 13:33:55 +08:00
Xinchen Hui
80a178015d Fixed unserialize implementation (it's complicated, this issue took me 4 hours :<, need some review) 2014-02-26 12:51:23 +08:00
Dmitry Stogov
398256e5fe Use better data structures (incomplete) 2014-02-14 13:40:11 +04:00
Dmitry Stogov
40e053e7f3 Use better data structures (incomplete) 2014-02-13 17:54:23 +04:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Michael Wallner
1ac4d8f2c6 fix bug #65481 (shutdown segfault due to serialize) 2013-08-20 00:05:11 +02:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Dmitry Stogov
ca77173afb Fixed incorrect type cast 2012-01-11 15:04:14 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Dmitry Stogov
878ada77a0 Added implicit type casting to allow reusage of macros in C++ extensions (Yoram) 2011-11-28 13:01:28 +00:00
Michael Wallner
b6921369b5 Fix Bug #55801 Behavior of unserialize has changed:
(un)serialize in __wakeup/__sleep now use clean var_hashes
2011-10-19 10:09:24 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Kalle Sommer Nielsen
208aa1025d Improved performance of unserialize(), original patch by galaxy dot mipt at gmail dot com 2010-09-18 16:09:28 +00:00
Scott MacVicar
c7b0abe6aa Fix a bug when var_export() causes a fatal error that could inadvertently display data due to flushing of the output buffer.
Examples include, memory limit, execution time and recursion.
2010-07-09 21:11:37 +00:00
Stanislav Malyshev
de8022e905 fix SplObjectStorage unserialization (CVE-2010-2225) 2010-06-29 00:58:31 +00:00
Michael Wallner
89e93723fb Added support for object references in recursive serialize() calls. FR #36424 2010-05-26 07:24:37 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Jani Taskinen
27e8fa0d31 MFH: sync (adds php_prefix_varname() API function) 2007-10-01 12:34:19 +00:00
Antony Dovgal
a69e6e2c79 MFH: improve variable name checks
add more tests
2007-05-22 14:34:23 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Dmitry Stogov
53b088e60c Make MEMORY_LIMIT and ZEND_USE_MALLOC_MM to be always enabled. They don't make any significant slowdown, but incrise maintainability a lot. Note that the setting of memory_limit wasn't changes (neither in main/main.c nor in php.ini) and it still set to 16M. 2006-12-20 10:49:33 +00:00
Antony Dovgal
7df81307c1 MFH 2006-12-08 21:18:43 +00:00
Antony Dovgal
f71a310543 MFH: fix possible issue in the serializer, which might currupt struc when reallocating arguments stack 2006-12-08 20:59:31 +00:00
Ilia Alshanetsky
5186ee9c59 Added memory_get_peak_usage() function for retrieving peak memory usage of
a PHP script.
2006-05-30 14:51:20 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Stefan Esser
2c25b9d866 Restore unserialize() speed 2005-01-15 18:18:08 +00:00
Marcus Boerger
91af7f394f - Add some checks when unserializing data to prevent buffer overflows 2004-09-05 16:29:05 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Derick Rethans
cd13464709 - Make them available on Windows too from other files. 2003-04-28 18:41:32 +00:00
Andrey Hristov
309ef518fc Renamed get_memory_usage() to memory_get_usage() (per Andi's advice)
This doesn't break any BC.
2003-01-18 15:03:01 +00:00
Andrey Hristov
7866f02260 added function get_memory_usage(). available only when PHP is compiled
with --enable-memory-limit
2003-01-14 18:26:47 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Shane Caraveo
7645343c4a need to export var_replace and var_destroy for win32 2002-08-04 23:45:38 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Jason Greene
150d339231 Renamed zval_debug_dump() to debug_zval_dump() 2002-02-10 17:38:15 +00:00
Jason Greene
91ac18bc66 @Added zval_debug_dump which works similar to var_dump yet displays extra
internal information such as refcounts, and the true type names (Jason)
2002-02-10 06:52:35 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Derick Rethans
3cb1db985e - Added var_export, which shows a representation of a variable, much like
var_dump, but in such a way you can use it as PHP code.
@- Added var_export, which shows a representation of a variable, much like
@  var_dump, but in such a way you can use it as PHP code. (Derick)
2001-12-08 23:44:34 +00:00