1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 01:48:26 +02:00
Commit Graph

12399 Commits

Author SHA1 Message Date
Nikita Popov 9d4a9ad0c7 Merge branch 'PHP-7.4' 2019-09-03 12:28:35 +02:00
Nikita Popov 518c651c66 Avoid pointer UB in strip_header
Don't calculate header_start if lc_header_start is NULL, as we're
going to overflow the address space in that case.
2019-09-03 12:28:18 +02:00
Nikita Popov 265af40a0a Use unsigned subtraction in php_random_int()
This subtraction may overflow the signed domain, which is UB. Use
an unsigned subtraction instead.
2019-09-03 12:28:18 +02:00
George Peter Banyard d0754b86b1 Promote warnings to errors in substr_count() 2019-08-31 23:37:04 +02:00
George Peter Banyard 0240b903c5 Promote warnings to errors in substr_compare() 2019-08-31 23:34:24 +02:00
Nikita Popov 82d9f14532 Merge branch 'PHP-7.4' 2019-08-30 16:37:20 +02:00
Nikita Popov 1e4cc5bf0b Fix file clashes in copy tests
Create the "*" file in a sub-directory rather than the main test
directory, so that it's different for each test.
2019-08-30 16:36:49 +02:00
Nikita Popov c217e31d0d Merge branch 'PHP-7.4' 2019-08-30 16:10:11 +02:00
Nikita Popov 2f67f32eaa Remove bogus vcwd_open
This is a left-over from the Linux version...
2019-08-30 16:09:55 +02:00
George Peter Banyard 1f647ab4ca Move and fix scandir related bug test 2019-08-30 09:50:04 +02:00
George Peter Banyard b3d725218d Promote warnings to errors in dir stdlib extension 2019-08-30 09:50:04 +02:00
George Peter Banyard 6c0eb1be33 Promote warnings to errors in assert_options() 2019-08-29 23:10:37 +02:00
George Peter Banyard dd10e70d0c Promote Directory handler warning to error 2019-08-29 23:08:25 +02:00
George Peter Banyard 62751b0d45 Promote warnings to errors in array_walk(_recursive)() 2019-08-29 16:02:59 +02:00
George Peter Banyard 81277a104c Promote warnings to errors in compact() 2019-08-29 16:02:20 +02:00
George Peter Banyard 20edea5a85 Promote warnings to errors in array_merge(_recursive)() and array_replace() 2019-08-29 16:01:39 +02:00
Nikita Popov 3da3b4c8f8 Merge branch 'PHP-7.4' 2019-08-29 14:47:30 +02:00
Nikita Popov a10093eee1 Use explicit unaligned type in md5 implementation 2019-08-29 14:47:03 +02:00
George Peter Banyard 70e604ee46 Promote warnings to errors in extract() 2019-08-28 23:15:01 +02:00
George Peter Banyard 9fc3d5da11 Promote warnings to errors in max() 2019-08-27 23:41:22 +02:00
George Peter Banyard b91a881b32 Promote warnings to errors in min() 2019-08-27 23:38:22 +02:00
Anatol Belski ad3c763e2c Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix signature and calls
2019-08-27 14:35:06 +02:00
Anatol Belski 9b5d66bd52 Fix signature and calls 2019-08-27 14:34:35 +02:00
Nikita Popov d93b094584 Throw TypeError from VM implementation of get_class()
The normal function already throws TypeError through the usual zpp
mechanism, but the VM implementation handles this manually and has
not been updated.
2019-08-27 09:37:48 +02:00
Nikita Popov f107b670da Add skipifs for zmm 2019-08-27 09:12:22 +02:00
Nikita Popov 085ddd0cde Fix chunk_split test on i386 release 2019-08-27 09:09:03 +02:00
George Peter Banyard 5b09e6043c Remove memory exhaustion checks in php_chunk_split() 2019-08-26 17:14:49 +02:00
George Peter Banyard 6d578482a9 Improve strpos and strstr function family implementation 2019-08-26 17:11:37 +02:00
Burak Çakırel d2210dc2ea Add assert arginfo stubs
Closes GH-4619.
2019-08-26 15:41:31 +02:00
Nikita Popov a98307df87 Make arginfo printing of prefer-ref arguments nicer 2019-08-26 15:39:39 +02:00
Nikita Popov 0c2d4d698c Make sure that params with null default are marked nullable 2019-08-26 14:34:28 +02:00
Nikita Popov a47f170a75 Assert that symbol table is available in compact()
I believe NULL here is no longer possible due to the dynamic call
check. A similar assumption already exists in the extract()
implementation.
2019-08-26 14:25:48 +02:00
George Peter Banyard c1c8538f95 Promote warnings to errors in array_rand() 2019-08-26 13:31:02 +02:00
Theodore Brown d5f42d68c8 Convert remaining array function arginfo to PHP stubs 2019-08-26 12:53:00 +02:00
George Peter Banyard 91f4e2e614 Promote warnings to errors in explode() 2019-08-26 11:35:03 +02:00
Nikita Popov 4c70a585b7 Merge branch 'PHP-7.4' 2019-08-26 10:28:14 +02:00
Nikita Popov bad49e55b9 Merge branch 'PHP-7.3' into PHP-7.4 2019-08-26 10:27:08 +02:00
Nikita Popov a26f63213d Merge branch 'PHP-7.2' into PHP-7.3 2019-08-26 10:26:49 +02:00
Nikita Popov 16d35eb643 Fix overflow in memory limit checks
Due to overflows in the memory limit checks, we were missing cases
where the allocation size was close to the address space size, and
caused an OOM condition rather than a memory limit error.
2019-08-26 10:25:30 +02:00
George Peter Banyard 743729d5bf Promote warnings to errors in str_pad() 2019-08-25 20:13:27 +02:00
Nikita Popov 6e3135070c Remove unnecessary haystack length check in stripos()
This falls out naturally from the following condition, because
either the needle length will be zero as well, or the needle
will be longer than the (empty) haystack.
2019-08-25 16:31:15 +02:00
Nikita Popov 4346d1b0e6 Remove unnecessary NULL check
needle_dup cannot be NULL here.
2019-08-25 16:30:16 +02:00
Nikita Popov d955ee9f6b Make string size calculation in chunk_split more precise
The +1 on the string length is unnecessary, as we need the string
length without trailing NUL byte here.

The +1 on the chunks is only necessary if there is a rest. If the
string devides into chunks exactly, we don't need an extra chunk.

This makes the allocations exactly as large as it needs to be.
2019-08-25 15:34:37 +02:00
Olumide Samson b9c961e160 Add some header and html function stub 2019-08-25 15:27:58 +02:00
Nikita Popov 3602fea659 Skip memory_limit test without ZMM 2019-08-25 09:38:49 +02:00
George Peter Banyard 9d18f23c4c Remove 'bogus' error condition in str_pad() 2019-08-24 16:05:00 +02:00
George Peter Banyard 675e975185 Promote warning to error in zend_forbid_dynamic_call() 2019-08-23 20:01:51 +02:00
George Peter Banyard 1059e3dc39 Promote warnings to errors in str_repeat() 2019-08-23 20:01:19 +02:00
Nikita Popov 51ea7fc477 Merge branch 'PHP-7.4' 2019-08-23 17:01:49 +02:00
Nikita Popov 6534ff13cd Avoid strncat use in proc_open
Instead manually manage the insertion position.
2019-08-23 16:18:59 +02:00