1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 23:18:13 +02:00
Commit Graph

10781 Commits

Author SHA1 Message Date
Anatol Belski dfc07f038b Sync test with newer output
Czech Republic vs. newer Czechia
2018-03-16 18:54:55 +01:00
Anatol Belski 8417a23973 Fixed bug #76068 parse_ini_string fails to parse "[foo]\nbar=1|>baz" with segfault 2018-03-10 11:18:21 +01:00
Nikita Popov fd5bd37ab1 Revert "Fixed bug #75961 (Strange references behavior)"
This reverts commit 94e9d0a2ae.

This code needs to be mindful about modifications to the array
happening during callback execution. It was written in a way that
only accessed the reference, which is guaranteed not to move. The
changed implementation instead accesses the array slot, leading to
use-after-free.

Run ext/standard/tests/array/bug61967.phpt under valgrind to see
the issue.
2018-03-05 15:32:21 +01:00
Stanislav Malyshev a6f7760d57 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75981: prevent reading beyond buffer start
2018-02-26 22:26:50 -08:00
Stanislav Malyshev dde7a05978 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #75981: prevent reading beyond buffer start
2018-02-26 22:26:26 -08:00
Stanislav Malyshev 523f230c83 Fix bug #75981: prevent reading beyond buffer start 2018-02-26 22:25:51 -08:00
Gabriel Caruso 0b8cfa6c78 Fix some arginfos
* all arguments for ftp_pasv are required
* $varname for getenv function isn't required anymore
* fsockopen and pfsockopen only require $hostname
* strtok can work with only one parameter
* strpbrk needs two parameters to work
* required parameters and add some parameters in openssl_* functions
2018-02-23 11:27:14 +01:00
Xinchen Hui 94e9d0a2ae Fixed bug #75961 (Strange references behavior) 2018-02-17 16:33:15 +08:00
Michael Wallner 42f2ae0572 fix bug #75916 DNS_CAA record results contain garbage
It is assumed that DNS_CAA record values are zero terminated,
while its length is defined as (RDATA_LENGTH - tag_length - 2).
2018-02-05 09:04:07 +01:00
Xinchen Hui 6da44fefb2 Fixed bug #75781 (substr_count incorrect result) 2018-01-09 16:21:02 +08:00
Lior Kaplan fbfdd1e1c4 Happy new year (Update copyright to 2018) 2018-01-02 23:42:29 +02:00
Xinchen Hui ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Anatol Belski 4c0af1fbd4 Fixed bug #75679 Path 260 character problem 2017-12-14 16:16:50 +01:00
johnstevenson 6ed242dfc8 Fixed #73124: php_ini_scanned_files()
Additional ini files are reported using the --ini option, but not by
`php_ini_scanned_files()`, which relied on PHP_CONFIG_FILE_SCAN_DIR.
2017-11-28 23:33:48 +01:00
Remi Collet 2b07102897 better fix for #75514 2017-11-28 17:42:43 +01:00
Anatol Belski 06202f0feb Fix allocation 2017-11-27 21:18:08 +01:00
Anatol Belski 2868ff84df Fix memory leak 2017-11-27 20:24:30 +01:00
Anatol Belski 2b7d283cc5 Fixed bug #75574 putenv does not work properly if parameter contains non-ASCII unicode character 2017-11-27 18:49:02 +01:00
krakjoe 5a7459a082 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #75409
2017-11-22 04:30:59 +00:00
Scott 269d160159 Fix bug #75409 2017-11-22 04:26:54 +00:00
Nikita Popov 092d0922ea Merge branch 'PHP-7.0' into PHP-7.1 2017-11-17 23:21:48 +01:00
Nikita Popov 0e097f2c96 Fixed bug #75535
The sizeof()s for Content-Length and Transfer-Encoding were missing
the trailing ":". Apart from being generally wrong, this no longer
verified that the header actually contains a colon, leading to the
null http_header_value being used.

Additionally, in the interest of being defensive, also make sure
that http_header_value is non-null by setting it to the end of
the header line (effectively an empty string) if there is no colon.
If the following conditions are correct, this value is not going
to be used though.
2017-11-17 23:18:05 +01:00
Remi Collet e704e1e8c2 Fixed bug #75514 mt_rand returns value outside [$min,$max]+ on 32-bit 2017-11-13 10:21:46 +01:00
Xinchen Hui c718fd16a1 Avoid overflow 2017-11-13 11:18:56 +08:00
Xinchen Hui 1c1df0d937 Fixed bug #75511 (fread not free unused buffer) 2017-11-13 11:13:27 +08:00
Anatol Belski 677cd85cb7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  It looks like i should've taken joint response on ext/fileinfo long ago
2017-10-11 22:24:52 +02:00
Anatol Belski 23e97b0222 It looks like i should've taken joint response on ext/fileinfo long ago 2017-10-11 22:21:34 +02:00
Sara Golemon ac1fd769ad Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS
2017-10-07 10:13:54 -04:00
Sara Golemon 843e492c68 Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS 2017-10-07 10:08:34 -04:00
Anatol Belski 72c008f945 Fix mkdir() special case for path length < 260 and > 248 2017-09-28 13:18:31 +02:00
Joe Watkins 2dd77456fe Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #75220 - Segfault when calling is_callable on parent
2017-09-27 06:08:01 +01:00
Nester a680d701ce Fixed #75220 - Segfault when calling is_callable on parent 2017-09-27 06:07:24 +01:00
Anatol Belski fcad6a97b8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix test failure on 32-bit
2017-09-12 18:18:44 +02:00
Anatol Belski 7674b5e574 Fix test failure on 32-bit 2017-09-12 18:17:28 +02:00
Anatol Belski d33194d2aa Fix test portability
The message comes from the C runtime, so it is not reliable to check the
exact wording.
2017-09-11 12:38:20 +02:00
Xinchen Hui 6b2813c3a7 Fixed bug #75152 (signed integer overflow in parse_iv) 2017-09-11 12:46:11 +08:00
Remi Collet c449057808 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  From documentation, only the sign of returned value is relevant
2017-08-24 10:29:44 +02:00
Remi Collet b7e96f8e0e From documentation, only the sign of returned value is relevant
With recent glibc, memcmp sometime return a negative value instead of -1
2017-08-24 10:27:38 +02:00
Andrea Faulds 158b06cffb Merge branch 'PHP-7.0' into PHP-7.1 2017-08-19 20:35:22 +01:00
Andrea Faulds 61538ebadc Fixed bug #75097 (gethostname fails if your host name is 64 chars long)
PHP contained two different off-by-one errors, which are fixed here. First,
it created a buffer of size HOST_NAME_MAX, not adding space for a null
terminator. Second, it subtracted 1 from the size of that buffer when passing
its size to gethostname(), despite gethostname() expecting it to be a buffer
size including space for a terminating null byte, not a string length.
2017-08-19 20:31:54 +01:00
Dmitry Stogov 3bc1226804 Made test 32/64-bit independent 2017-08-15 13:12:54 +03:00
Xinchen Hui 4f8e703854 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75075 (unpack with X* causes infinity loop)
2017-08-15 12:34:37 +08:00
Xinchen Hui d8c80af71e Fixed bug #75075 (unpack with X* causes infinity loop) 2017-08-15 12:34:13 +08:00
Anatol Belski 1f3b87dc11 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Test cleanup improvements, files might be locked in the test process
2017-08-14 14:39:58 +02:00
Anatol Belski ab07265573 Test cleanup improvements, files might be locked in the test process 2017-08-14 13:08:04 +02:00
Anatol Belski bd0b0cc8c9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix test cleanup
2017-08-14 12:55:58 +02:00
Anatol Belski 71fd58652f fix test cleanup 2017-08-14 12:55:14 +02:00
Anatol Belski 3069ad8dd1 Fixed bug #75063 2017-08-14 00:44:19 +02:00
Nikita Popov 4fb7665c09 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-12 13:15:48 +02:00
Nikita Popov 1a23ebc1ff Fixed bug #74103 and bug #75054
Directly fail unserialization when trying to acquire an r/R
reference to an UNDEF HT slot. Previously this left an UNDEF and
later deleted the index/key from the HT.

What actually caused the issue here is a combination of two
factors: First, the key deletion was performed using the hash API,
rather than the symtable API, such that the element was not actually
removed if it used an integral string key. Second, a subsequent
deletion operation, while collecting trailing UNDEF ranges, would
mark the element as available for reuse (leaving a corrupted HT
state with nNumOfElemnts > nNumUsed).

Fix this by failing early and dropping the deletion code.
2017-08-12 13:11:35 +02:00