Nikita Popov
079f2f7eb3
Forbid exchangeArray() during sorting
...
Previously this would leak.
2016-02-24 22:34:50 +01:00
Nikita Popov
eb885e9d6e
Fix leak on assignment to illegal AO offset
2016-02-24 17:39:16 +01:00
Nikita Popov
ea02f57656
Don't use ht applyCount for AO sorting protection
...
Instead use the AOs own applyCount that just got freed up. Using the
apply count of the HashTable has various side effects, e.g. preventing
the ArrayObject from being dumped.
2016-02-24 17:18:07 +01:00
Nikita Popov
38db6ff306
Remove recursion checks from AO get_properties
...
These are pointless, there is no recursion (of that kind) happening
there.
2016-02-24 17:10:28 +01:00
Nikita Popov
78b29310bc
Remove check_std_props arg from get_hash_table
...
get_properties() is the only place using it, so handle it only
there.
2016-02-22 13:09:54 +01:00
Nikita Popov
3f5c80e8c2
Don't recurse into USE_OTHER checking STD_PROP_LIST
...
If STD_PROP_LIST is explicitly disabled in the constructor, it
should really be disabled.
2016-02-22 13:04:19 +01:00
Nikita Popov
6c2ca18fe0
Fix typo in previous commit
...
Happened to be correct because array is the first member, but
definitely not what I wanted...
2016-02-22 12:39:07 +01:00
Nikita Popov
fd6ac61064
Fix ArrayObject clone for certain USE_OTHER cases
...
We can't simply use HASH_OF, need to use the usual hash table
getter.
2016-02-22 12:35:00 +01:00
Nikita Popov
32e2801ff9
Use USE_OTHER for ArrayIterator cloning
...
intern->array should never be an array with refcount 2.
2016-02-22 12:35:00 +01:00
Nikita Popov
0bd64b50b8
Fixed bug #71617
2016-02-21 13:00:37 +01:00
Stanislav Malyshev
9afb29aa68
Remove TSRMLS_* from code, they are not used anymore
2016-02-17 22:44:05 -08:00
Stanislav Malyshev
52e0c4081f
Fix bug #71313 - Use-after-free vulnerability in SPL(SplObjectStorage, unserialize)
2016-01-17 23:23:42 -08:00
Stanislav Malyshev
bcd64a9bdd
Fixed bug #71311 : Use-after-free vulnerability in SPL(ArrayObject, unserialize)
2016-01-17 17:53:03 -08:00
Bogdan Padalko
2b4625d687
Remove obj handlers ptr value from spl_object_hash()
...
We still keep the same output length, for people who rely on the
return value having a specific format. The handler part will now
simply be always the same (it was the same nearly always anyway).
The motivation behind this change is to avoid breaking
spl_object_hash() and SplObjectStorage if an extension changes the
handlers table of an object. This has come up, for example, in
weakref implementations.
2016-01-12 16:47:21 +01:00
Lior Kaplan
ed35de784f
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf
Happy new year (Update copyright to 2016)
2016-01-01 19:21:47 +02:00
Tom Van Looy
aadb3dd503
These function docs are referencing zend_object_value but this should be zend_object
2015-12-24 10:24:53 +01:00
Xinchen Hui
c2fa01b939
Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
...
* 'PHP-7.0' of git.php.net:/php-src:
update NEWS
update NEWS
fix merge mistake
Added test for bug #71201
Bug #71201 round() segfault on 64-bit builds
Sort 7.0.1 extensions' entries
Added test for bug #71201
Bug #71201 round() segfault on 64-bit builds
Add CVE for #71020 (PHP 7.0.1)
Update NEWS & Fixed test
Fixed bug #71204 (segfault if clean spl_autoload_funcs while autoloading)
This should never fail
Fixed bug #71202 (Autoload function registered by another not activated immediately)
Updated NEWS
Added support for HTTP 451
2015-12-24 10:42:42 +08:00
Xinchen Hui
64071fc531
Superfluous semicolon
2015-12-24 10:41:05 +08:00
Xinchen Hui
825b7f895a
Update NEWS & Fixed test
2015-12-23 08:13:13 -08:00
Xinchen Hui
8692a99551
Merge branch 'PHP-5.6' into PHP-7.0
2015-12-23 08:11:09 -08:00
Xinchen Hui
620ccc9b1a
Fixed bug #71204 (segfault if clean spl_autoload_funcs while autoloading)
2015-12-23 08:10:59 -08:00
Xinchen Hui
9cc4cdbe57
This should never fail
2015-12-23 07:52:24 -08:00
Xinchen Hui
e21cb2daea
Fixed bug #71202 (Autoload function registered by another not activated immediately)
2015-12-23 07:48:00 -08:00
Nikita Popov
a3e1952700
Fixed bug #71153
2015-12-17 20:59:57 +01:00
Xinchen Hui
c096a281be
The first arg is optional
2015-12-10 19:36:41 +08:00
Xinchen Hui
7c1ddcc67f
Fixed bug #71077 (ReflectionMethod for ArrayObject constructor returns wrong number of parameters)
2015-12-10 08:58:28 +08:00
Xinchen Hui
311eb2b11e
Missed one place
2015-12-04 06:51:16 -08:00
Xinchen Hui
7ac24aa661
Fixed bug #71028 (Undefined index with ArrayIterator)
2015-12-04 06:45:26 -08:00
Xinchen Hui
9397f52724
Fixed Bug #70967 (Weird error handling for __toString when Error is thrown)
2015-11-28 23:38:19 -08:00
Xinchen Hui
f8bf1f33a5
Fixed bug #70959 (ArrayObject unserialize does not restore protected fields)
2015-11-23 07:08:47 -08:00
Xinchen Hui
27aef97f65
Fixed bug #70868 (PCRE JIT and pattern reuse segfault)
2015-11-06 11:37:17 +08:00
Reeze Xia
435565a54f
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Make test for bug #70852 to cover all cases
Fixed bug #70852 Segfault getting NULL offset of an ArrayObject.
2015-11-05 14:28:49 +08:00
Reeze Xia
1c0622a472
Make test for bug #70852 to cover all cases
2015-11-05 14:09:24 +08:00
Reeze Xia
51218b3b9d
Fixed bug #70852 Segfault getting NULL offset of an ArrayObject.
2015-11-05 13:46:03 +08:00
Xinchen Hui
e4ac4e75b5
Fixed bug #70853 (SplFixedArray throws exception when using ref variable as index)
2015-11-04 06:44:29 -08:00
Stanislav Malyshev
26e5429f72
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Fix bug #64172
Bug #70561 : Fix DirectoryIterator to throw OutOfBoundsException
Conflicts:
ext/pdo/pdo_dbh.c
2015-10-18 17:20:00 -07:00
Stanislav Malyshev
0b35e0c5a1
Merge branch 'pull-request/1535' into PHP-5.6
...
* pull-request/1535:
Bug #70561 : Fix DirectoryIterator to throw OutOfBoundsException
2015-10-18 17:17:55 -07:00
Xinchen Hui
e2d6090043
Fixed bug #70730 (Incorrect ArrayObject serialization if unset is called in serialize())
...
It's possible to fixed this in SPL side, but it will be ugly, and we
should make serialize more robust, so I prefer fix it in serialize side.
2015-10-17 05:28:49 -07:00
Nikita Popov
cd2b0a7bb8
Drop HAVE_PACKED_OBJECT_VALUE
...
This check doesn't make sense anymore, we have no object_value
anymore.
2015-10-06 23:12:34 +02:00
Xinchen Hui
925412ee1c
Do not edit the zval cause it might be in shared memory
2015-10-03 19:50:38 -07:00
Dmitry Stogov
f509706318
Make necessary separation (it might be possible to fix this in a better way, but this will requre some refactoring)
2015-09-25 10:59:27 +03:00
Dmitry Stogov
c21d18ef95
Cleanup: avoid useless array duplication
2015-09-25 02:20:05 +03:00
Dmitry Stogov
01d5beddf4
Cleanup
2015-09-25 01:36:10 +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
Dmitry Stogov
415000ed93
Fixed bug #70573 (Cloning SplPriorityQueue leads to memory leaks)
2015-09-24 16:42:59 +03:00
Bishop Bettini
368d3ff0d9
Bug #70561 : Fix DirectoryIterator to throw OutOfBoundsException
...
-------------------------------------------------------------------------------
DirectoryIterator implements SeekableIterator, which "should throw an
OutOfBoundsException if the position is not seekable". As is, seek just returns
and one must call valid(). This approach is different than most (all?) other
SeekableIterator implementations and leads to developer confusion. See the
bug report for a specific example.
2015-09-23 11:14:52 -04:00
Dmitry Stogov
e45f67245a
Cleanup: don't keep useless dangling pointer
2015-09-22 17:48:25 +03:00
Dmitry Stogov
e050412cdd
Cleanup: removed old commented code
2015-09-22 17:06:10 +03:00
Dmitry Stogov
c72559ddf6
Cleanup: removed deprecated commented code
2015-09-22 17:02:25 +03:00