Christoph M. Becker
a927056cad
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-13 16:31:43 +02:00
Christoph M. Becker
33508a3d47
Merge branch 'PHP-5.6' into PHP-7.0
2016-08-13 16:23:15 +02:00
Christoph M. Becker
82df4e2638
Fix #72278 : getimagesize returning FALSE on valid jpg
...
getimagesize() is rather strict about the length of the marker payload data,
and fails if there are extraneous bytes before the next marker. Only a very
special case reported in bug #13213 is catered to.
libjpeg is rather resilient to such corrupted JPEG files, and raises a
recoverable error in this case. Other image processors also accept such
JPEG files, so we adapt getimagesize() to skip (but warn about) such
extraneous bytes.
2016-08-13 16:14:34 +02:00
Christoph M. Becker
f0c77ee7f8
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-13 12:06:11 +02:00
Christoph M. Becker
a93c62aafa
Merge branch 'PHP-5.6' into PHP-7.0
2016-08-13 11:47:20 +02:00
Christoph M. Becker
ae3b2078ea
Fix #72823 : strtr out-of-bound access
...
If php_strtr_array_prepare_repls() reports pattern_len == 0, we return
early to avoid OOB accesses, and because there is nothing to replace anyway.
2016-08-13 11:40:33 +02:00
Xinchen Hui
dd618664a0
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #72813 (Segfault with __get returned by ref)
Fix URL rewriter partially
Conflicts:
Zend/zend_object_handlers.c
ext/standard/url_scanner_ex.c
ext/standard/url_scanner_ex.re
2016-08-12 16:35:41 +08:00
Anatol Belski
e5d9d009cf
add missing chunk to support mb path in symlink()
2016-08-11 13:38:28 +02:00
Anatol Belski
525eb35667
fix typo
2016-08-11 13:38:28 +02:00
Anatol Belski
6359c7a2bf
add missing mb path support chunk
2016-08-11 13:38:28 +02:00
Ville Hukkamäki
283b0cc8a5
Fix #72810 . Add check for SKIP_ONLINE_TESTS
2016-08-11 12:01:24 +02:00
Yasuo Ohgaki
ae3782a0db
Fix URL rewriter partially
2016-08-11 09:18:47 +09:00
Yasuo Ohgaki
f19578ad58
Fix URL rewriter partially
2016-08-11 09:18:33 +09:00
Yasuo Ohgaki
a53a6b3fb4
Fix URL rewriter issues
2016-08-11 08:31:48 +09:00
Leigh
9a9004318f
Preserve BC for rand() AND mt_rand() where min > max
2016-08-10 23:32:32 +01:00
Leigh
2ece5decb7
Swap min/max if min > max
2016-08-08 22:31:59 +01:00
Leigh
99e3bb1430
Allow min > max for mt_rand(). Bug #72784
2016-08-08 22:16:27 +01:00
Nikita Popov
cf017ce17f
Fix array_column() packed hash initialization
...
FILL assumes enough space is alredy allocated -- do that. Note that
the used size is an upper bound, albeit a likely one.
2016-08-08 18:47:52 +02:00
Nikita Popov
e52c1f3ca9
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-07 18:50:27 +02:00
Lauri Kenttä
e616bc8694
Fix bug #55451
...
Make substr_compare ignore the length if it's NULL. This allows to
use the last parameter (case_insensitivity) with the default length.
2016-08-07 18:48:36 +02:00
Nikita Popov
f350e20da6
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-07 18:38:43 +02:00
Nikita Popov
56d7e98ddf
Merge branch 'PHP-5.6' into PHP-7.0
2016-08-07 18:38:28 +02:00
Nikita Popov
40d237df1f
Fix stream_socket_enable_crypto() test
...
The whole test doesn't make any sense at all, but this only fixes
the additional warnings you get when linked against openssl w/o
SSL3.
2016-08-07 18:37:38 +02:00
Nikita Popov
3823bfc6f2
Avoid use of scratch space in HTTP fopen wrapper
...
Instead directly write into req_buf smart_str.
2016-08-07 17:43:06 +02:00
Leigh
5bf39267ee
mt_rand 32/64-bit consistency
2016-08-06 11:15:26 +01:00
Nikita Popov
be31515cc6
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-05 23:10:12 +02:00
Nikita Popov
a2a2ea18fe
Merge branch 'PHP-5.6' into PHP-7.0
...
Conflicts:
ext/standard/ftp_fopen_wrapper.c
2016-08-05 23:09:30 +02:00
Ville Hukkamaki
65056e9d6c
Fix #72764
...
Negotiate data channel encryption after NLST command.
This is to prevent issues with IIS and ProFTPD.
2016-08-05 22:56:54 +02:00
Ville Hukkamäki
318d3b3a3f
Implement request #27814
...
Construct HTTP request headers into smart_str and send whole
request in one go.
2016-08-04 14:20:36 +02:00
Christoph M. Becker
a8515a339d
Fix broken skip marker in test case
2016-08-04 12:06:07 +02:00
Stanislav Malyshev
67264ebc70
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fix bug #72716 - initialize buffer before read
2016-08-03 23:03:15 -07:00
Stanislav Malyshev
b57474f23e
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Fix bug #72716 - initialize buffer before read
Conflicts:
ext/standard/ftp_fopen_wrapper.c
2016-08-03 23:00:32 -07:00
Stanislav Malyshev
4f861b6071
Fix bug #72716 - initialize buffer before read
2016-08-03 22:59:42 -07:00
Remi Collet
f9ce8aa75b
Minor revert of be3640150c
...
On 32bits this may cause php to hangs forever.
2016-08-03 14:27:46 +02:00
Remi Collet
a70ca97c18
fix paths in tests
2016-08-03 14:24:35 +02:00
Remi Collet
8b7f594a2b
clean removed functions (since they are alias)
2016-08-03 12:59:14 +02:00
Remi Collet
cff668f7a7
Fix 32bits tests
...
Notice: this warning is only raise since rand is an alias to mt_rand
2016-08-03 12:56:07 +02:00
Remi Collet
60bb15d8a1
add skipif (needs json)
2016-08-03 11:03:22 +02:00
Xinchen Hui
6d1f473247
It's packed array
2016-08-03 12:37:14 +08:00
Xinchen Hui
be00b4ed13
Optmized array_rand
2016-08-03 12:06:04 +08:00
Xinchen Hui
501d24f81b
Optimized array_pad
2016-08-03 11:24:31 +08:00
Xinchen Hui
82ba5b59d9
Fixed warning: "operation on ‘s’ may be undefined"
2016-08-02 20:28:42 +08:00
Xinchen Hui
81a7d52814
Folder marks
2016-08-02 20:08:15 +08:00
Xinchen Hui
70f79fd8b6
Optimized array_merge and cleanup
2016-08-02 20:02:23 +08:00
Xinchen Hui
e730c8fc90
Optimized array_merge
2016-08-02 17:39:53 +08:00
Xinchen Hui
fea2042a47
Optimized array_column (thanks to Benjamin Coutu)
2016-08-02 12:40:46 +08:00
Xinchen Hui
a15902fa71
fixed IS_REFERENCE handling
2016-08-02 11:05:51 +08:00
Xinchen Hui
4d9195927a
Optimized array_reverse
2016-08-01 20:11:08 +08:00
Nikita Popov
11e050920d
Fix memory unsafety in array_walk()
...
Fixes bugs #61967 , #62607 , #69068 , #70713 .
The primary changes are:
a) Use the ht_iterator mechanism to ensure safety not only if the
iterated array itself changes, but also if it is replaced (and
potentially destroyed) entirely. We use the same semantics for
behavior under modification as foreach-by-reference. In
particular, we advance to the next element before processing it.
If the iterated entity is exchanged we iterate the new one from
the start. If it is not an array/object we warn and abort.
b) Always create a reference to the current value. Previously the
code kept the value as a non-reference and updated it to the
reference value produced by the user callback. However this is
unsafe, as the array may have been reallocated in the meantime,
so the previous value pointer is no longer value.
c) Around a recursive walk, incref the reference containing the
array. This ensures that the location where the currently
iterated value is stored cannot be freed.
One problem I was not able to solve is that we cannot decrement
the apply count if the array is exchanged during a recursive walk.
2016-07-30 00:15:32 +02:00
Nikita Popov
261c436d8c
Merge branch 'PHP-7.0' into PHP-7.1
2016-07-29 19:08:15 +02:00