Commit Graph

1359 Commits

Author SHA1 Message Date
Dmitry Stogov
a08723d3d3 Use interned empty and "one char" strings. 2017-05-18 17:59:59 +03:00
Sebastian Bergmann
6035ebd4a6 Merge branch 'PHP-7.1' 2017-04-11 08:29:14 +02:00
Sebastian Bergmann
25c941807b Merge branch 'PHP-7.0' into PHP-7.1 2017-04-11 08:28:55 +02:00
Sebastian Bergmann
7cdf520319 Fix bug #74409 2017-04-11 08:27:17 +02:00
Nikita Popov
e3b2b05229 Merge branch 'PHP-7.1' 2017-03-27 19:02:50 +02:00
x-xiang
e9e860a05b Don't retain mt_rand() seeds across requests
In particular, this prevents manual seeding of mt_rand() to leak
across requests.
2017-03-27 19:02:39 +02:00
Nikita Popov
8015daeddb Merge branch 'PHP-7.1' 2017-03-16 12:57:43 +01:00
Nikita Popov
63e59c75a5 Merge branch 'PHP-7.0' into PHP-7.1 2017-03-16 12:57:36 +01:00
Adam Saponara
98f4ce9363 Return FALSE if error_log fails to write all bytes 2017-03-16 12:56:36 +01:00
Xinchen Hui
b717c7ffb0 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments)
2017-02-23 11:02:48 +08:00
Xinchen Hui
48fcc5ddc2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments)
2017-02-23 11:02:37 +08:00
Xinchen Hui
1d4eead995 Fixed bug #74148 (ReflectionFunction incorrectly reports the number of arguments) 2017-02-23 11:02:23 +08:00
Joe Watkins
4e3a4c119d
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73994 incorrect arginfo for unpack
2017-01-26 06:58:53 +00:00
Joe Watkins
76a7470160
Fixed bug #73994 incorrect arginfo for unpack 2017-01-26 06:58:08 +00:00
Joe Watkins
5b23f5d73a
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed #72974 imap is undefined service on AIX
2017-01-09 05:15:48 +00:00
Joe Watkins
c39f71ba9f
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #72974 imap is undefined service on AIX
2017-01-09 05:15:34 +00:00
Joe Watkins
b8215c0817
Fixed #72974 imap is undefined service on AIX 2017-01-09 05:15:21 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Sara Golemon
5c919ee30b Use new param API in standard/basic_functions 2016-12-30 16:13:14 -08:00
Dmitry Stogov
72616c5ede Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed arginfo
2016-12-19 11:13:21 +03:00
Dmitry Stogov
6ea44908fb Fixed arginfo 2016-12-19 11:13:02 +03:00
Anatol Belski
b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Dmitry Stogov
628cde2fae Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed memory leaks in parse_ini_file()
2016-11-18 16:19:00 +03:00
Dmitry Stogov
d769a020df Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed memory leaks in parse_ini_file()
2016-11-18 16:18:22 +03:00
Dmitry Stogov
97b65cc9c2 Fixed memory leaks in parse_ini_file() 2016-11-18 16:17:52 +03:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Michele Locati
33301d5bae Add VT100 support for Windows
Fix function names prefix

Use Unicode version of GetFinalPathNameByHandle

Use EG(windows_version_info) instead of RtlGetVersion

Use the specified handle_id instead of STD_OUTPUT_HANDLE

Switch from stream name to stream resource

Allow running tests capturing only stdout and/or stderr

Add tests for stream_vt100_support function

Export Win32 console functions

Fix x64 build

Use zend_long instead of long long, use GetConsole instead of GetFinalPathNameByHandleW to check if a handle is a valid console stream

Always use zend_long on any platform

Use _get_osfhandle to determine the standard handle

Accept stream names

Raise warnings in case of invalid stream parameter

Return true if disabling VT100 support on a not-console/redirected stream or on old Windows versions

Remove php_win32_console_os_supports_vt100

Differentiate stdin vs stdout/stderr

Simplify setting flag

Allow avoid piping STDIN

Let stream_vt100_support accept only resources

Fix run-tests

Revert console flags in case of failure

Simplify logic of stream_vt100_support when setting the flag

Return true if succeeded, false otherwise

Drop support for STDIN

More comprehensive tests for stream_vt100_support

Remove old tests

Fix name of included file and use absolute paths

Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows by default

Remove tests for stream_vt100_support

Split stream_vt100_support into stream_isatty+sapi_windows_vt100_support

Add tests for stream_isatty

Add tests for sapi_windows_vt100_support

Return null from stream_isatty is neither Windows nor Posix

Fallback to S_ISCHR if neither Windows nor Posix

Avoid defining argc since it's only used once

Better comment about php_win32_console_fileno_is_console

Use events instead of cNumberOfEvents

Do not restore previous console mode

We need to restore previous console mode on failing SetConsole calls only for STDIN

Don't configure STDOUT/STDERR on Windows with PHP_CLI_WIN32_NO_CONSOLE
2016-10-28 19:23:00 +02:00
Andrea Faulds
d8f27b2be8 Merge branch 'DedupNANINF' 2016-10-26 16:46:36 +01:00
Andrea Faulds
1a512eed44 Move utf8_encode and utf8_decode to ext/standard 2016-10-17 15:39:02 +01:00
Nikita Popov
02ba9d71ab Unwrap reference returns in cufa etc 2016-09-30 22:10:01 +02:00
Andrea Faulds
fc5497cb92 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-11 22:46:20 +01:00
Andrea Faulds
d690014bf3 Remove zpp fallback code (always use Fast ZPP)
Squashed commit of the following:

commit 3e27fbb3d2
Author: Andrea Faulds <ajf@ajf.me>
Date:   Sun Sep 11 19:14:37 2016 +0100

    Keep dummy FAST_ZPP macro for compatibility

commit 8a7cfd00de
Author: Andrea Faulds <ajf@ajf.me>
Date:   Mon Sep 5 22:36:03 2016 +0100

    Remove FAST_ZPP macro and plain zpp fallback code
2016-09-11 22:44:46 +01:00
Xinchen Hui
434ae90e85 Fixed bug #72920 (Accessing a private constant using constant() creates an exception AND warning) 2016-08-22 23:44:38 +08:00
Anatol Belski
872028de20 fix TS issues with url rewrite globals 2016-08-20 22:41:06 +02: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
Xinchen Hui
6e16ea4135 Fixed arginfo 2016-07-20 18:09:17 +08:00
Xinchen Hui
e4af29b0b7 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed arginfo
2016-07-20 18:07:18 +08:00
Xinchen Hui
9ebc96116b Fixed arginfo 2016-07-20 18:07:02 +08:00
Stanislav Malyshev
70d6ce3368 Merge branch 'PHP-7.0'
* PHP-7.0: (27 commits)
  fix #72519, possible OOB using imagegif
  fix #72512, invalid read or write for palette image when invalid transparent index is used
  Apparently some envs miss SIZE_MAX
  Fix tests
  Fix bug #72618: NULL Pointer Dereference in exif_process_user_comment
  Partial fix for bug #72613 - do not allow reading past error read
  Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t
  Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c
  Fix for bug #72558, Integer overflow error within _gdContributionsAlloc()
  Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE
  update NEWS
  Fixed bug #72570 Segmentation fault when binding parameters on a query without placeholders
  Fix bug #72562 - destroy var_hash properly
  Fix bug #72551 and bug #72552 - check before converting size_t->int
  Fix bug #72541 - size_t overflow lead to heap corruption
  Fix bug #72533 (locale_accept_from_http out-of-bounds access)
  Fix fir bug #72520
  Fix for bug #72513
  Fix for bug #72513
  CS fix and comments with bug ID
  ...

Conflicts:
	ext/standard/basic_functions.c
2016-07-19 01:44:14 -07:00
Stanislav Malyshev
b00f8f2a5b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix #72519, possible OOB using imagegif
  fix #72512, invalid read or write for palette image when invalid transparent index is used
  Apparently some envs miss SIZE_MAX
  Fix tests
  Fix bug #72618: NULL Pointer Dereference in exif_process_user_comment
  Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t
  Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c
  Fix for bug #72558, Integer overflow error within _gdContributionsAlloc()
  Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE
  Fix bug #72562 - destroy var_hash properly
  Fix bug #72533 (locale_accept_from_http out-of-bounds access)
  Fix fir bug #72520
  Fix for bug #72513
  Fix for bug #72513
  CS fix and comments with bug ID
  Fix for HTTP_PROXY issue.
  5.6.24RC1
  add tests for bug #72512
  Fixed bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access
  Fixed bug #72479 - same as #72434

Conflicts:
	Zend/zend_virtual_cwd.c
	ext/bz2/bz2.c
	ext/exif/exif.c
	ext/session/session.c
	ext/snmp/snmp.c
	ext/standard/basic_functions.c
	main/SAPI.c
	main/php_variables.c
2016-07-19 01:39:28 -07:00
Stanislav Malyshev
4d0565b5ba Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix #72519, possible OOB using imagegif
  fix #72512, invalid read or write for palette image when invalid transparent index is used
  Apparently some envs miss SIZE_MAX
  Fix tests
  Fix bug #72618: NULL Pointer Dereference in exif_process_user_comment
  Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t
  Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c
  Fix for bug #72558, Integer overflow error within _gdContributionsAlloc()
  Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE
  Fix bug #72562 - destroy var_hash properly
  Fix bug #72533 (locale_accept_from_http out-of-bounds access)
  Fix fir bug #72520
  Fix for bug #72513
  CS fix and comments with bug ID
  Fix for HTTP_PROXY issue.
  add tests for bug #72512
  Fixed bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access
  Fixed bug #72479 - same as #72434

Conflicts:
	ext/bz2/bz2.c
	main/SAPI.c
	main/php_variables.c
2016-07-19 00:53:08 -07:00
Leigh
ab834f472f Merge RNG fixes RFC. PR #1986
* rng-fixes:
  Fix legacy mode RAND_RANGE and 32/64-bit consistency
  Fix crypt salt not being converted to b64
  Make mode selection part of mt_srand()
  Use zend_bitset
  Improve array_rand distribution
  Fix some insecure usages of php_rand
  Alias rand to mt_rand
  Fix RAND_RANGE for mt_rand
  Fix mt_rand impl. Provide legacy impl. access.
  Split rand and mt_rand into separate files
2016-07-17 16:05:10 +00:00
Martin Vobruba
2809a676b5 Pass error severity to SAPI modules and raise corresponding error level in Apache 2016-07-11 09:34:48 +02:00
Stanislav Malyshev
98b9dfaec9 Fix for HTTP_PROXY issue.
The following changes are made:
- _SERVER/_ENV only has HTTP_PROXY if the local environment has it,
  and only one from the environment.
- getenv('HTTP_PROXY') only returns one from the local environment
- getenv has optional second parameter, telling it to only consider
  local environment
2016-07-10 16:21:11 -07:00
Adam Saponara
e4f7f00a77 Add optind param to getopt 2016-07-08 16:53:24 +02:00
Leigh
69e7d8dcd5 Make mode selection part of mt_srand()
The mode of operation is intrinsically linked to seeding, so this makes a lot of sense
2016-07-07 15:14:06 +01:00
Leigh
6d6ef7aacc Alias rand to mt_rand 2016-07-05 15:09:49 +01:00