Commit Graph

4943 Commits

Author SHA1 Message Date
Nikita Popov
5383c9d9e5 Merge branch 'PHP-7.1' 2017-02-12 00:06:47 +01:00
Nikita Popov
6d5ea20e0b Merge branch 'PHP-7.0' into PHP-7.1 2017-02-12 00:06:35 +01:00
Denis Yeldandi
9814be4bc2 Fixed bug #69860 2017-02-12 00:06:04 +01:00
Anatol Belski
048aec4796 Revert "refactor php_win32_get_random_bytes()"
This reverts commit 23bd7bcde0.

Looks like this change is unstable. If same CSP is use but multiple processers,
the initialization failures are possible. Thus, CryptAcquireContext in
every process, even if it won't be used at all, is not sensible. This
might actually motivate to look for better CSP APIs.
2017-02-11 21:47:09 +01:00
Anatol Belski
23bd7bcde0 refactor php_win32_get_random_bytes()
- avoid locking
- initialize only once
- the process will fail, if no init failed
2017-02-11 19:15:35 +01:00
Anatol Belski
02991f75ce Revert "move winsock specific stuff into dllmain"
This reverts commit d94c2c796a.

WSA functions are documented explicitly as unsafe for dllmain
2017-02-11 18:55:32 +01:00
Anatol Belski
d94c2c796a move winsock specific stuff into dllmain 2017-02-11 16:46:17 +01:00
Dmitry Stogov
c39147d136 Fixed bug #74053 (Corrupted class entries on shutdown when a destructor spawns another object). (jim at commercebyte dot com)
Merge branch 'master' of github.com:commercebyte/php-src

* 'master' of github.com:commercebyte/php-src:
  Added EG(flags) - executor global flags EG_FLAGS_IN_SHUTDOWN - is set when PHP is in shutdown state
  newly added zend_object_store.no_reuse is redefined as a global zend_object_store_no_reuse, to avoid alignment issues
  Alignment fix, as per @nikic
  The test scripts bug64720.phpt and bug68652.phpt were relying on the buggy behavior, when PHP returns "Undefined static property" error due to class entry corruption. With my fix for bug 74053, both tests return no errors now, I corrected the EXPECTF accordingly
  Bug Fix: Corrupted class entries on shutdown when a destructor spawns another object (C) 2017 CommerceByte Consulting
2017-02-10 10:31:43 +03:00
Jim Zubov
1b1399c95d Added EG(flags) - executor global flags
EG_FLAGS_IN_SHUTDOWN - is set when PHP is in shutdown state
2017-02-09 12:40:33 -05:00
Nikita Popov
c61daf415d Deprecate track_errors / $php_errormsg 2017-02-03 21:02:52 +01:00
Dmitry Stogov
7aff166e57 Arguments array can't make cycles 2017-02-03 17:38:03 +03:00
Nikita Popov
7ae4fa8a03 Merge branch 'PHP-7.1' 2017-02-02 18:07:27 +01:00
Nikita Popov
d2658287fa Merge branch 'PHP-7.0' into PHP-7.1 2017-02-02 18:07:05 +01:00
Nikita Popov
a15bffd105 Fix bug #73807 2017-02-02 18:06:15 +01:00
Joe Watkins
c34bf0015b
bump versions 2017-01-31 12:48:05 +00:00
Anatol Belski
536b3ca1e1 bump versions for next in dev 2017-01-31 11:18:23 +01:00
Brian Evans
2fe9208ee3
Use modern autotools name of configure.ac instead of configure.in
configure.ac was introduced in 2001 with automake-1.15 and autoconf-2.50
to replace the file named configure.in.
Autotools is preparing to remove configure.in in Automake 2.0.
All new software should be using configure.ac.
This also fixes Bug #69770 where extensions are creating configure.in

Signed-off-by: Brian Evans <grknight@gentoo.org>
2017-01-27 06:07:40 +00:00
Stricted
bb059fe0a7
add PHP_OS_FAMILY constant to determine on which os we are 2017-01-25 20:50:14 +00:00
Nikita Popov
fd4025069d
Enable HT RC assertions with escape-hatch
HT functions that modify the array now assert that rc=1. As we don't
respect this COW constraint everywhere, either for a good reason or
because fixing it would take more work, we provide an escape hatch
in the form of HT_ALLOW_COW_VIOLATION(ht). If this macro is called
assertions on this ht are disabled. The macro is a no-op in release
mode.
2017-01-23 17:19:06 +00:00
Sara Golemon
4fb70c7577 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix open_basedir check for glob:// opendir wrapper
2017-01-09 16:08:31 -08:00
Sara Golemon
005ba2001d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix open_basedir check for glob:// opendir wrapper
2017-01-09 16:08:08 -08:00
Sara Golemon
69fbe3a9ad Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix open_basedir check for glob:// opendir wrapper
2017-01-09 16:07:33 -08:00
Sara Golemon
7e49e8e797 Fix open_basedir check for glob:// opendir wrapper
php_check_open_basedir() expects a local filesystem path,
but we're handing it a `glob://...` URI instead.

Move the check to after the path trim so that we're checking
a meaningful pathspec.
2017-01-09 11:02:50 -08:00
Nikita Popov
53ff546054 Merge branch 'PHP-7.1' 2017-01-07 22:54:26 +01:00
Nikita Popov
bb2ab75555 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-07 22:54:16 +01:00
Nikita Popov
a46bbdda2e Fixed bug #67583
As fcgi_request is an opaque struct as of PHP 7, expose a new API
function fcgi_end() which does fcgi_flush() with end=1 and checks/
sets the ->ended flag.
2017-01-07 22:53:28 +01:00
Nikita Popov
f346bd6ee6 Rename fcgi_request.closed to .ended
"closed" refers to whether FCGI_END_REQUEST has been sent, while
the "close" operation does something entirely different. It gets
extra confusing when fcgi_is_closed() does not actually return
fcgi_request.closed...
2017-01-07 22:45:19 +01:00
Anatol Belski
eb1913f21e Merge branch 'PHP-7.1'
* PHP-7.1:
  add 'e' flag for fopen() to enable CLOEXEC
2017-01-07 12:37:50 +01:00
Anatol Belski
bba09d56e5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  add 'e' flag for fopen() to enable CLOEXEC
2017-01-07 12:36:09 +01:00
Evgeniy Makhrov
d0279242ce add 'e' flag for fopen() to enable CLOEXEC 2017-01-07 12:10:51 +01:00
Joe Watkins
c9abe878b5
Merge branch 'PHP-7.1'
* PHP-7.1:
  Increase realpath_cache_size default value
  add UPGRADING note for realpath_cache_size
2017-01-06 05:32:12 +00:00
Joe Watkins
d5a1c5a96b
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Increase realpath_cache_size default value
  add UPGRADING note for realpath_cache_size
2017-01-06 05:31:29 +00:00
Joe Watkins
8a6d3d3d2e
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Increase realpath_cache_size default value
2017-01-06 05:27:04 +00:00
Markus Staab
782b84c6d5
updated default per proposal
TODO: adjust php.ini defaults
2017-01-06 05:25:08 +00:00
Markus Staab
66b698c3cf
Increase realpath_cache_size default value 2017-01-06 05:25:04 +00:00
Ferenc Kovacs
3b14d7b84b 5.6.31 is next 2017-01-06 01:43:11 +01:00
Joe Watkins
4cce1e9a94
wrong version 2017-01-05 17:00:40 +00:00
Joe Watkins
e627aa9841
bump version after release 2017-01-05 16:50:52 +00:00
Anatol Belski
997d902762 move dev to next 2017-01-05 01:12:18 +01: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
4f70d93d3c Update copyright header for new file 2017-01-03 08:02:12 -06:00
Sammy Kaye Powers
1e3624290a Resolve conflict 2017-01-03 08:01:05 -06:00
Joe Watkins
0788f3ed3c
Merge branch 'pull-request/2163'
* pull-request/2163:
  import explicit_bzero + strlc* functions update since 1999 algorithms have changed and register k/w not necessary anymore.
2017-01-03 06:48:40 +00:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Nikita Popov
5fc9aa9a95 Make printf_to_smart_str(ing) the primitive printf operation
vs(tr)pprintf is now implemented in Zend on top of
printf_to_smart_str(int), which is provided as a utility function.

This allows us to efficiently printf to the end of a smart string.
2017-01-01 21:28:20 +01:00
Nikita Popov
c7742e280a Export zend_s(tr)pprintf
It's annoying that in Zend you have to use zend_strpprintf instead
of strpprintf, while in PHP you have to use strpprintf instead of
zend_strpprintf.

Make zend_s(tr)pprintf always available and keep s(tr)pprintf as
macro aliases.
2017-01-01 21:28:20 +01:00
Nikita Popov
38f72cea1b Sync smart_string implementation with smart_str
Switch to using inline functions instead of macros, etc.
2017-01-01 21:28:20 +01:00
Nikita Popov
abb91ee9ea Move smart_string to Zend
smart_str is already in Zend.
2017-01-01 21:28:20 +01:00
Nikita Popov
52da05c535 Merge branch 'PHP-7.1' 2017-01-01 21:17:00 +01:00
Nikita Popov
a5027d43dd Merge branch 'PHP-7.0' into PHP-7.1 2017-01-01 21:09:27 +01:00
Nikita Popov
935b5cb11e Flush stderr on win32 in cli_log_message
This allows us to unfork a bunch of tests for Windows.
2017-01-01 21:09:02 +01:00
Anatol Belski
afb6ca2566 Finish remaining replacement uint => uint32_t
Tthe core should be normalized now, no uints anymore
2016-12-22 14:32:02 +01:00
Kalle Sommer Nielsen
d4831e2d0a Eliminate win95nt.h
- Most of this is builtin php.h now
- Removed some dead defines
- We now pass /D _USE_MATH_DEFINES for M_PI etc
2016-12-22 06:51:18 +01:00
Anatol Belski
837cce3b0b move the defs to the right place 2016-12-22 02:17:55 +01:00
Anatol Belski
9bcd2bcc21 Merge branch 'PHP-7.1'
* PHP-7.1:
  Care about intput and output encoding, as per default encoding RFC
2016-12-14 03:12:46 +01:00
Anatol Belski
e33ec61f9c Care about intput and output encoding, as per default encoding RFC
If PHP CLI is used with programs with no Unicode support, the default
PHP console codepage might cause backward incompatible behaviors. This
is solved with this patch by separating the handling of I/O codepage.
As per https://wiki.php.net/rfc/default_encoding input_encodnig and
output_encoding are centralized INI settings, so they're used for the
purpose of adjusting the codepage. This gives user the ability to use
UTF-8 internally, while letting the system API to convert the output
to a compatible codepage. This also might solve the font issues on
systems without good true type support.

Note, that there no change to the default behavior - if input and
output encoding are not set, which is the default case, the default
charset applies to both console input and output. The patch is just
a compilment to the backward compatibility, not more and not less.
2016-12-14 02:51:29 +01:00
Davey Shafik
2f5090168f Bump versions and NEWS for 7.1.1-dev 2016-12-02 02:24:54 -08: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
Ferenc Kovacs
e715dafae0 5.6.30 will be next 2016-11-24 01:54:23 +01:00
Anatol Belski
df902a7c28 move dev to next 2016-11-22 11:49:09 +01:00
Kalle Sommer Nielsen
1b5b9234a3 Remove these NetWare leftovers 2016-11-19 10:47:20 +01:00
Joe Watkins
a2bc7cf9ca Merge branch 'master' of git.php.net:/php-src 2016-11-12 17:30:41 +00:00
Andrea Faulds
3ed8b7a87b Use "Standard input code" instead of "php://stdin" 2016-11-12 17:26:20 +00:00
Andrea Faulds
a103aa2dbd Show "php://stdin" instead of "-" in error messages 2016-11-12 17:26:20 +00: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
Kalle Sommer Nielsen
2de9c42f97 Remove this check as discussed with Anatol 2016-11-05 23:08:08 +01:00
Ferenc Kovacs
9b3a1e00ab 5.6.29 will be next 2016-10-27 23:10:59 +02:00
Anatol Belski
100650bc5d add some float limits constants 2016-10-26 18:10:44 +02:00
Anatol Belski
277e829f10 move dev to 7.0.14 2016-10-25 10:29:51 +02:00
David Carlier
81ce32a48f updating cvs revisions of strlcat/cpy 2016-10-20 14:13:09 +01:00
David Carlier
1ece764114 let s use the macro instead 2016-10-15 17:55:44 +01:00
David Carlier
2464dbd5f3 import explicit_bzero + strlc* functions update
since 1999 algorithms have changed and register k/w
not necessary anymore.
2016-10-15 14:53:38 +01:00
Stanislav Malyshev
f8be3ede4f Fix bug #73189 - Memcpy negative size parameter php_resolve_path
(cherry picked from commit da7e89cde8)
(cherry picked from commit c4c2cce37d)
2016-10-14 01:50:22 +02:00
Sara Golemon
25d4943b44 Clear FG(user_stream_current_filename) when bailing out
If a userwrapper opener E_ERRORs then FG(user_stream_current_filename)
would remain set until the next request and would not be pointing
at unallocated memory.

Catch the bailout, clear the variable, then continue bailing.

Closes https://bugs.php.net/bug.php?id=73188

(cherry picked from commit 9f86cdaf7f)
2016-10-14 01:34:51 +02:00
Anatol Belski
f7aa911d9b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #73189 - Memcpy negative size parameter php_resolve_path
2016-10-12 21:33:13 +02:00
Stanislav Malyshev
c4c2cce37d Fix bug #73189 - Memcpy negative size parameter php_resolve_path
(cherry picked from commit da7e89cde8)
2016-10-12 21:31:37 +02:00
Sara Golemon
43ccf23d70 Clear FG(user_stream_current_filename) when bailing out
If a userwrapper opener E_ERRORs then FG(user_stream_current_filename)
would remain set until the next request and would not be pointing
at unallocated memory.

Catch the bailout, clear the variable, then continue bailing.

Closes https://bugs.php.net/bug.php?id=73188
2016-10-11 21:55:01 -07:00
Sara Golemon
9f86cdaf7f Clear FG(user_stream_current_filename) when bailing out
If a userwrapper opener E_ERRORs then FG(user_stream_current_filename)
would remain set until the next request and would not be pointing
at unallocated memory.

Catch the bailout, clear the variable, then continue bailing.

Closes https://bugs.php.net/bug.php?id=73188
2016-10-11 21:46:02 -07:00
Sara Golemon
4d11a8eedf Clear FG(user_stream_current_filename) when bailing out
If a userwrapper opener E_ERRORs then FG(user_stream_current_filename)
would remain set until the next request and would not be pointing
at unallocated memory.

Catch the bailout, clear the variable, then continue bailing.

Closes https://bugs.php.net/bug.php?id=73188
2016-10-11 21:44:14 -07:00
Stanislav Malyshev
689a9b8def Merge branch 'PHP-5.6.27' into PHP-5.6
* PHP-5.6.27:
  Fix tests
  fix tsrm
  Fix bug #73284 - heap overflow in php_ereg_replace function
  Fix bug #73276 - crash in openssl_random_pseudo_bytes function
  Fix bug #73293 - NULL pointer dereference in SimpleXMLElement::asXML()
  fix bug #73275 - crash in openssl_encrypt function
  Fix for #73240 - Write out of bounds at number_format
  Bug #73218: add mitigation for ICU int overflow
  Add more locale length checks, due to ICU bugs.
  Fix bug #73208 - another missing length check
  Fix bug #73190: memcpy negative parameter _bc_new_num_ex
  Fix bug #73189 - Memcpy negative size parameter php_resolve_path
  Fixed bug #73174 - heap overflow in php_pcre_replace_impl
  Fix bug #73150: missing NULL check in dom_document_save_html
  Fix bug #73147: Use After Free in PHP7 unserialize()
  Fix bug #73082
  Fix bug #73073 - CachingIterator null dereference when convert to string
2016-10-11 16:26:35 -07:00
Anatol Belski
940731df04 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix datatype
2016-10-06 11:03:45 +02:00
Anatol Belski
bc5efe501e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix datatype
2016-10-06 11:03:09 +02:00
Anatol Belski
ea83e504e5 fix datatype 2016-10-06 11:01:27 +02:00
Anatol Belski
46f4470e0d ensure the flag doesn't overflow
In certain case, it could take more than just 0/1, but 2 bits should
be enough.
2016-10-06 10:18:31 +02:00
Anatol Belski
1e986c709c handle the stream->__exposed flag correctly
as it's a flag now, just set the value
2016-10-06 02:15:29 +02:00
Anatol Belski
42b7912f03 catch up with stream datatypes 2016-10-05 22:53:21 +02:00
Anatol Belski
02acb056b3 uint vs. uint32_t 2016-10-05 22:53:21 +02:00
Anatol Belski
0ca15cbeba reduce size of stream struct
32 bytes are spared on 64-bit build
2016-10-05 22:53:21 +02:00
Anatol Belski
4b41973ba1 prevent flags overflows
Sometimes int is overflown. That might still come out with a right
result, but is ofc not clean.
2016-10-05 22:53:21 +02:00
Anatol Belski
41d04079e3 reduce size of stream bucket struct by 8 bytes on 64-bit 2016-10-05 22:53:21 +02:00
Stanislav Malyshev
40e7baab3c Fix bug #73190: memcpy negative parameter _bc_new_num_ex 2016-10-03 00:09:02 -07:00
Stanislav Malyshev
da7e89cde8 Fix bug #73189 - Memcpy negative size parameter php_resolve_path 2016-09-28 23:30:48 -07:00
Ferenc Kovacs
703c247c7d 5.6.28 is next 2016-09-29 00:55:36 +02:00
Nikita Popov
e81a5a0d1b Merge branch 'PHP-7.1' 2016-09-28 19:20:30 +02:00
Nikita Popov
4c0804c07d Ensure symtable exists before checking it 2016-09-28 19:20:17 +02:00
Anatol Belski
cb29c01ed6 prepare next 2016-09-27 12:49:52 +02:00
Anatol Belski
3529f2814d Merge branch 'PHP-7.1'
* PHP-7.1:
  Revert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"
2016-09-23 18:48:41 +02:00
Anatol Belski
90a3671c09 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Revert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"
2016-09-23 18:48:14 +02:00
Anatol Belski
4685297f05 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Revert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"
2016-09-23 18:46:51 +02:00
Anatol Belski
075aa911ff Revert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"
This reverts commit f9a699f6c3.
2016-09-23 18:45:03 +02:00
Anatol Belski
f9a699f6c3 Fixed bug #73037 SoapServer reports Bad Request when gzipped
(cherry picked from commit 410c68788a)
2016-09-23 18:06:12 +02:00
Anatol Belski
f59ea5d6a1 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73037 SoapServer reports Bad Request when gzipped
2016-09-23 16:08:09 +02:00
Anatol Belski
4b13f60278 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73037 SoapServer reports Bad Request when gzipped
2016-09-23 16:07:12 +02:00
Anatol Belski
410c68788a Fixed bug #73037 SoapServer reports Bad Request when gzipped 2016-09-23 16:02:50 +02:00
Xinchen Hui
ac07008bb7 Fixed bug #72505 (readfile() mangles files larger than 2G) 2016-09-16 20:53:51 +08:00
Christoph M. Becker
fcc6f2df59 Merge branch 'PHP-7.1' 2016-09-06 14:15:05 +02:00
Christoph M. Becker
68d3501381 Merge branch 'pull-request/2115' into PHP-7.1 2016-09-06 14:14:23 +02:00
Nikita Popov
69f0d3df60 Bump PHP_API_VERSION 2016-09-04 14:27:28 +02:00
Christoph M. Becker
727b422ad9 Fix #72948: Uncatchable "Catchable" fatal error for class to string conversions
E_RECOVERABLE errors are reported as "Catchable fatal error". This is
misleading, because they actually can't be caught via try-catch statements.
Therefore we change the wording to "Recoverable fatal error" as suggested by
Nikita.
2016-09-03 13:05:37 +02:00
Ferenc Kovacs
fbb81dd755 5.6.27 will be next 2016-09-01 20:27:19 +02:00
Anatol Belski
bc7460260b prepare for next 2016-08-30 14:11:22 +02:00
Nikita Popov
6416312f9b Merge branch 'PHP-7.1' 2016-08-19 00:34:38 +02:00
Nikita Popov
37b0dcc8e0 Decouple DEBUG_FILE_UPLOAD from ZEND_DEBUG
Enabling ZEND_DEBUG should not result in intrusive program
behavior changes.
2016-08-19 00:34:13 +02:00
Xinchen Hui
660d8f1622 Merge branch 'PHP-7.1'
* PHP-7.1: (49 commits)
  Update NEWs
  Update NEWs
  Unused label
  Fixed bug #72853 (stream_set_blocking doesn't work)
  fix test
  Bug #72663 - part 3
  Bug #72663 - part 2
  Bug #72663 - part 1
  Update NEWS
  BLock test with memory leak
  fix tests
  Fix TSRM build
  Fix bug #72850 - integer overflow in uuencode
  Fixed bug #72849 - integer overflow in urlencode
  Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption
  Fix bug #72838 - 	Integer overflow lead to heap corruption in sql_regcase
  Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
  Fix bug #72836 - integer overflow in base64_decode caused heap corruption
  Fix for bug #72807 - do not produce strings with negative length
  Fix for bug #72790 and bug #72799
  ...
2016-08-17 17:15:11 +08:00
Xinchen Hui
ce6ad9bdd9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: (48 commits)
  Update NEWs
  Unused label
  Fixed bug #72853 (stream_set_blocking doesn't work)
  fix test
  Bug #72663 - part 3
  Bug #72663 - part 2
  Bug #72663 - part 1
  Update NEWS
  BLock test with memory leak
  fix tests
  Fix TSRM build
  Fix bug #72850 - integer overflow in uuencode
  Fixed bug #72849 - integer overflow in urlencode
  Fix bug #72848 - integer overflow in quoted_printable_encode caused heap corruption
  Fix bug #72838 - 	Integer overflow lead to heap corruption in sql_regcase
  Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
  Fix bug #72836 - integer overflow in base64_decode caused heap corruption
  Fix for bug #72807 - do not produce strings with negative length
  Fix for bug #72790 and bug #72799
  Fix bug #72730 - imagegammacorrect allows arbitrary write access
  ...

Conflicts:
	ext/standard/var_unserializer.c
2016-08-17 17:14:30 +08:00
Xinchen Hui
3956deb1b2 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #72853 (stream_set_blocking doesn't work)

Conflicts:
	main/streams/plain_wrapper.c
2016-08-17 16:56:02 +08:00
Xinchen Hui
abe00908af Fixed bug #72853 (stream_set_blocking doesn't work)
Implemented  PHP_STREAM_OPTION_META_DATA_API for plain_wrappers
2016-08-17 16:54:21 +08:00
Stanislav Malyshev
75d7666968 Merge branch 'PHP-7.0.10' into PHP-7.0
* PHP-7.0.10:
  Fix bug #72749: wddx_deserialize allows illegal memory access
  Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF
  fix tests
  Fix bug#72697 - select_colors write out-of-bounds
  Fix bug #72708 - php_snmp_parse_oid integer overflow in memory allocation
  Fix bug #72730 - imagegammacorrect allows arbitrary write access
  Fix bug #72750: wddx_deserialize null dereference
  Fix bug #72771: ftps:// opendir wrapper is vulnerable to protocol downgrade attack
  fix tests
  add missing skipif section
  Fix for bug #72790 and bug #72799
  Fix bug #72837 - integer overflow in bzdecompress caused heap corruption
  Fix bug #72742 - memory allocator fails to realloc small block to large one
  Use size_t for path length
  Check for string overflow
  Fix for bug #72782: mcrypt accepts only ints, so don't pass anything else
  Fix bug #72674 - check both curl_escape and curl_unescape
2016-08-16 23:52:22 -07:00
Anatol Belski
8666d185cd Merge branch 'PHP-7.1'
* PHP-7.1:
  fix test
  fix blocking pipe stream option value
2016-08-17 00:59:25 +02:00
Anatol Belski
abc7d1f140 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix test
  fix blocking pipe stream option value
2016-08-17 00:58:54 +02:00
Anatol Belski
6de67244d4 fix blocking pipe stream option value
As revealed by #72857, this value conflicts with the xport option.
Wrong code can otherwise cause streams misbehave, fe if local and
network streams APIs are mixed.
2016-08-17 00:53:15 +02:00
Stanislav Malyshev
6304a611cd Use size_t for path length 2016-08-10 23:46:58 -07:00
Kalle Sommer Nielsen
197051f3ab Remove sql.safe_mode
This is one of the last old and odd deprecated settings we still have in PHP, it was never fully implemented in all the database extensions and should probably have been gone back in 5.4, along with safe_mode. Although if my memory strikes me right, mysql was also supporting it back then, but not mysqli.

So far only interbase was supporting this feature, and the removal of it causes two effects for interbase:
 - CREATE DATABASE is now allowed no matter
 - The default database set by php.ini (ibase.default_db) is no longer forced

http://php.net/ini.core#ini.sql.safe-mode
2016-08-11 05:06:55 +02:00
Nikita Popov
3dbb834993 Update php_version.h 2016-08-07 17:52:37 +02:00
Nikita Popov
1392e07cfc Merge branch 'PHP-7.1' 2016-08-07 17:47:17 +02:00
Nikita Popov
af77c53ee1 Fix PUTC warning
Change the macro to not provide a useless return value using a
comma expression, which generates warnings.
2016-08-07 17:43:20 +02:00
Kalle Sommer Nielsen
7813e9de11 Fixed bug #5453 (WSA cleanup executes before MSHUTDOWN)
This moves the WSACleanup() call to after zend_shutdown() in main.c, I did some testing and I could not find any issues with this. I don't expect this to cause any issues on Netware either, although untested as I do not have such an env available (do we even support Netware anymore? Last release was in 2009 and it is now discontinued)

Besides the movie, then this commit also contains a fix to the check of WSAStartup() where we don't actually confirm we get the desired version of the winsock.dll (We use 2.0).
2016-08-06 04:06:50 +02:00
Xinchen Hui
1ff8856d03 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #72743 (Out-of-bound read in php_stream_filter_create)
2016-08-04 19:10:56 +08:00
Xinchen Hui
3800e1cf97 Fixed bug #72743 (Out-of-bound read in php_stream_filter_create) 2016-08-04 19:10:40 +08:00
Ferenc Kovacs
562c17eb4e 5.6.26 will be next 2016-08-04 01:39:37 +02:00
Nikita Popov
6a748c2f4b Merge branch 'PHP-7.1' 2016-08-03 00:35:16 +02:00
Nikita Popov
41e93041f8 Merge branch 'PHP-7.0' into PHP-7.1 2016-08-03 00:35:00 +02:00
Nikita Popov
1bcd439cad Fix bug #72724 2016-08-03 00:34:36 +02:00
Anatol Belski
5c51433e2a prepare next 2016-08-02 11:13:20 +02:00
Anatol Belski
9f14920725 fix php_version.h 2016-08-02 11:06:33 +02:00
Anatol Belski
845f66ba64 increase versions for 7.2 2016-08-02 11:01:57 +02:00
Pierrick Charron
929c1e0cdf Merge branch 'PHP-7.0' into PHP-7.1 2016-07-27 00:39:47 -04:00
Pierrick Charron
6714f73545 Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
	main/streams/streams.c
2016-07-27 00:38:54 -04:00
Pierrick Charron
074b86d845 Fixed bug #72686 (zlib: url support is broken).
zlib: support is broken since a really long time.
It never worked on versions >= PHP5.6 so we can just remove
this dead code.

Bug was introduced 2006-05-14 (Before 5.2.0)
2016-07-27 00:33:13 -04:00
Lauri Kenttä
7a02704c0e Require strict base64 in data URI
As the tests already show, the data URI wrapper is supposed to fail
for corrupt input, but for some reason, one case of invalid input is
still allowed to pass?! Strict base64 makes a lot more sense here.
Also, Chromium and Firefox fail on invalid base64, so it's a logical
choice for PHP as well.
2016-07-22 18:03:55 +02:00
Xinchen Hui
97c0b133c5 Fixed bug #72629 (Caught exception assignment to variables ignores references). 2016-07-20 16:59:14 +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
Stanislav Malyshev
aca4f65c7e CS fix and comments with bug ID 2016-07-12 21:35:02 -07:00
Bob Weinand
b00376884e Rewrite watchpoints to be much more stable
This mainly involves a separate abstraction layer for elements (e.g. $a->b) and watchpoints (on pointer of the Bucket for example).
Also better comparison handling (value backup vs. page dumps).

It is not yet finished (there are sometimes false positives announced and names not yet perfect), but the functionality is working and not crashing as far as I have tested.
Future scope is also relative watchpoints, e.g. "w $this->val expression()" which does not have the symbol tables as basis, but the value (in this example: return value of expression()) as basis.
2016-07-11 23:58:20 +02: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
Christoph M. Becker
10e8248082 Implement #43269: Retrieve FD_SETSIZE within PHP
To give userland developers who work with large numbers of file descriptors
the opportunity to avoid problems on systems which may not support that
many descriptors (e.g. when calling socket_select()), we make FD_SETSIZE
available in PHP as PHP_FD_SETSIZE.
2016-07-08 15:23:15 +02:00