Commit Graph

11715 Commits

Author SHA1 Message Date
Nikita Popov
6818ca3c02 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-11 15:36:27 +01:00
Nikita Popov
1fd32e9c2f Fixed bug #76717
Print INT_MIN as -INT_MAX-1 to avoid it getting parsed as a float
literal due to integer overflow.
2019-03-11 15:35:02 +01:00
Andrew Brampton
c79ce48ddb Fix #71890: Add support for crc32c Castagnoli's polynomial.
This variant of crc32 is heavily used by storage systems, such as iSCSI, SCTP,
Btrfs, ext4, and is increasingly being used in API (such as Google Cloud
Storage, and Apache Kafka).
2019-03-11 10:19:35 +01:00
Dmitry Stogov
0a416b3d97 ws 2019-03-07 13:59:18 +03:00
Dmitry Stogov
2f2d15791a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #77345 (Stack Overflow caused by circular reference in garbage collection)
2019-03-07 13:53:43 +03:00
Dmitry Stogov
5da591c529 Fixed bug #77345 (Stack Overflow caused by circular reference in garbage collection) 2019-03-07 13:33:19 +03:00
Christoph M. Becker
0d88388912 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77700: Writing truecolor images as GIF ignores interlace flag
2019-03-06 00:37:38 +01:00
Christoph M. Becker
41fb0eaa11 Fix #77700: Writing truecolor images as GIF ignores interlace flag
We  revert the interlace flag related part of commit ff2822a[1], since
contrary to the transparent color, the interlace flag is not retained
by `gdImageCreatePaletteFromTrueColor()`.  This also matches upstream
libgd.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=ff2822a82b740edb8ccf307f080bae188c200fb9>
2019-03-06 00:34:40 +01:00
Remi Collet
0e836f523a add NEWS entry 2019-03-05 07:32:24 +01:00
Christoph M. Becker
007ac353dd Update NEWS 2019-03-04 19:50:41 +01:00
Christoph M. Becker
6ff0b24ef4 Update NEWS 2019-03-04 13:47:14 +01:00
Nikita Popov
3f00c9367d Fixed bug #77691
We cannot replace an op1_def opcode with an ASSIGN, if it also has
a used res_def. Usually this doesn't happen because the res_def use
can be eliminated first. The example is a case where operand replacement
on the res_def use fails.
2019-03-04 13:11:12 +01:00
Remi Collet
2694953ada add NEWS entries 2019-03-04 11:09:01 +01:00
Peter Kokot
637713c1a4 Update NEWS 2019-03-02 18:50:33 +01:00
Peter Kokot
c39fb1fc4f Update NEWS 2019-03-01 22:44:22 +01:00
Nikita Popov
16cda039b5 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-01 14:51:55 +01:00
Kevin Adler
006355c9fa Fix bug #77677: WCOREDUMP not available on all systems
Add #ifdef WCOREDUMP around all uses.

Also Change core dump message to yes/no/unknown in lsapilib.
2019-03-01 14:51:15 +01:00
Derick Rethans
a890c5beb8 Fixed bug #50020 (DateInterval:createDateFromString() silently fails) 2019-02-28 13:50:35 +00:00
Nikita Popov
019fd1d9ba Merge branch 'PHP-7.2' into PHP-7.3 2019-02-28 09:58:47 +01:00
Nikita Popov
9ad9cc71ff Fixed bug #77669 2019-02-28 09:58:01 +01:00
Xinchen Hui
fb3f078eeb Update NEWS 2019-02-25 15:00:37 +08:00
Xinchen Hui
1c22ace058 Fixed bug #77660 (Segmentation fault on break 2147483648) 2019-02-25 15:00:14 +08:00
Xinchen Hui
3b5475e9ee Update NEWS 2019-02-25 14:42:18 +08:00
Xinchen Hui
4a72dd782d Fixed bug #77664 (Segmentation fault when using undefined constant in custom wrapper) 2019-02-25 14:41:46 +08:00
Christoph M. Becker
831eba0eac Fix #77648: BOM in sapi/apache2handler/php_functions.c 2019-02-22 11:10:50 +01:00
Nikita Popov
bd2a00acdf Merge branch 'PHP-7.2' into PHP-7.3 2019-02-22 10:13:21 +01:00
Nikita Popov
5388143855 Fixed bug #77652 2019-02-22 10:11:54 +01:00
Frank Denis
b824424481 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #77646
2019-02-21 16:45:43 +01:00
Frank Denis
5c221bcd01 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77646
2019-02-21 16:34:42 +01:00
Frank Denis
08089b575b Fix bug #77646 2019-02-21 16:33:03 +01:00
Frank Denis
9609950331 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #77646
2019-02-21 16:19:44 +01:00
Frank Denis
e7ca69f1fa Fix bug #77646 2019-02-21 16:14:33 +01:00
Nikita Popov
e5d8ac92a4 Merge branch 'PHP-7.2' into PHP-7.3 2019-02-21 13:45:53 +01:00
Nikita Popov
934691fabb Fixed bug #77597
The same variable was reused in two nested loops... The test doesn't
fail on 7.2, but I'm fixing this here anyway as the code is clearly
wrong, and probably erroneous in other situations.
2019-02-21 13:42:47 +01:00
Christoph M. Becker
2ec59b3ef3 Prepare main branch for PHP 7.3.4 2019-02-19 13:06:40 +01:00
Remi Collet
b243f2feca bump version to 7.2.17-dev 2019-02-19 12:46:52 +01:00
Tyson Andre
8588a45851 Fix arginfo for tidy's global functions
See https://secure.php.net/tidy_getopt , etc.

I can't find any other obvious incorrect reflection.
2019-02-18 17:49:02 +01:00
Christoph M. Becker
767fa3dc02 Fix #77626: Persistence confusion in php_com_import_typelib()
We apply only the most minimal fix here, and will cater to the
unnecessary re-allocation for PHP-7.4.

We don't need to add a regression test, since bug39606.phpt and
bug77621.phpt already show the misbehavior.
2019-02-15 18:56:24 +01:00
Christoph M. Becker
fae22461f9 Deprecate case-insensitive constants via typelib import
As of PHP 7.3.0, case-insensitive constants are deprecated.  We catch
up on this with regard to ext/com_dotnet, which allows to import
constants from typelibs, by triggering a deprecation notice whenever
`com_load_typelib()` is called with `$case_sensitive` being `false`,
and whenever `com.autoregister_casesensitive` is set to `false`,
regardless of whether there are actually constants in the typelib which
would be imported.
2019-02-15 13:07:56 +01:00
Christoph M. Becker
8946ad3000 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77621: Already defined constants are not properly reported
2019-02-15 00:37:39 +01:00
Christoph M. Becker
de738496c2 Fix #77621: Already defined constants are not properly reported
We must not check uninitialized values (i.e. `c.value`), and we have to
use proper types for printf-style formats (i.e. `char *` instead of
`zend_string *`).
2019-02-15 00:35:21 +01:00
David Walker
e63febb1c7 Fixed bug #75921
Ensure that the "creating default object from empty value" warning is
always thrown. Previously some cases were missing the warning, in
particular those going through FETCH_OBJ_W rather than a dedicated
opcode (like ASSIGN_OBJ).

One slightly unfortunate side-effect of this change is that something
like $a->b->c = 'd' will now generate two warnings rather than one
when $a is null (one for property b, one for property c).
2019-02-14 12:50:25 +01:00
Nikita Popov
eb063c8a9f Fixed bug #77612
Port php_setcookie() to use the smart_str API to ensure that there
can be no string truncation issues.
2019-02-14 10:42:59 +01:00
Anatol Belski
34122ede21 Update NEWS and UPGRADING [ci skip] 2019-02-12 19:14:32 -08:00
Nikita Popov
9364153942 Fixed bug #76430
It's somewhat ambiguous what exactly the correct behavior is
supposed to be, I'm just picking something more or less reasonable
here.
2019-02-12 17:36:07 +01:00
Christoph M. Becker
6ac8b0a783 Deprecate ext/wddx
Cf. <https://wiki.php.net/rfc/deprecate-and-remove-ext-wddx>.
2019-02-11 19:31:46 +01:00
Darek Slusarczyk
6f7a47db5d Merge branch 'PHP-7.2' into PHP-7.3 2019-02-11 18:18:57 +01:00
Darek Slusarczyk
83d2bc9b6d Merge branch 'PHP-7.1' into PHP-7.2 2019-02-11 18:08:21 +01:00
Darek Slusarczyk
2eaabf06fc security fix - by default 'local infile' is disabled:
- set default for mysqli.allow_local_infile=0
- explicitly disable PDO::MYSQL_ATTR_LOCAL_INFILE in case of lack of driver options
- add getAttribute support for PDO::MYSQL_ATTR_LOCAL_INFILE
- update existing tests where needed
- add new tests [checking default value and setting on] the 'local infile' in ext/mysqli and ext/pdo_mysql
2019-02-11 18:04:51 +01:00
Nikita Popov
4da67537c1 Merge branch 'PHP-7.2' into PHP-7.3 2019-02-11 15:50:47 +01:00
Ahmed Abdou
ec28d4c247 Fix bug #51068 (glob:// do not support current path relative)
Fix DirectoryIterator glob://* current path relative queries
2019-02-11 15:50:27 +01:00
Nikita Popov
be64a06b1c Merge branch 'PHP-7.2' into PHP-7.3 2019-02-11 11:33:04 +01:00
johnstevenson
fe4d7248cc Fix #77552: Uninitialized buffer in stat functions 2019-02-11 11:31:55 +01:00
Xinchen Hui
4f044f680c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #77589 (Core dump using parse_ini_string with numeric sections)

Conflicts:
	Zend/zend_ini_scanner.c
2019-02-11 15:33:59 +08:00
Xinchen Hui
92055ca79b Fixed bug #77589 (Core dump using parse_ini_string with numeric sections)
Section name should not be typed(NULL, FALSE, TRUE etc)
2019-02-11 15:27:29 +08:00
Christopher Jones
98b73dbd94 Merge PDO_OCI tracing attribute PR 2019-02-11 17:05:36 +11:00
Christopher Jones
bdce2954c3 Merge PDO_OCI PR 2019-02-11 16:38:23 +11:00
Christopher Jones
1f86dcdd13 PDO_OCI tracing attribute PR merge 2019-02-11 16:19:13 +11:00
Christoph M. Becker
b2907527e9 Fix NEWS
Bug #77287 is already fixed in PHP 7.3.2.
2019-02-05 23:04:31 +01:00
Côme Chilliet
d93ce17959 Mark ldap_control_paged_result and ldap_control_paged_result_response as deprecated
These functions have serious limitations and may confuse users.
Same operations can be done using the new ldap control system in search
 operations.
2019-02-04 12:20:51 +01:00
Christoph M. Becker
c0228f741e [ci skip] Add missing notes regarding gc_status() 2019-02-03 18:28:43 +01:00
Dmitry Stogov
203a2da30a Fixed bug #77329 (Buffer Overflow via overly long Error Messages) 2019-02-01 11:11:15 +03:00
Joe Watkins
25dc5f18e4
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug 76596: phpdbg supports display_errors=stderr
2019-01-30 18:28:55 +01:00
Joe Watkins
7d1df603ad
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug 76596: phpdbg supports display_errors=stderr
2019-01-30 18:28:25 +01:00
Kevin Abel
3890c8bce5
Fix bug 76596: phpdbg supports display_errors=stderr 2019-01-30 18:27:57 +01:00
Joe Watkins
b8e683e868
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77546 iptcembed broken function
2019-01-30 17:10:33 +01:00
Guillaume Degoulet
f27f902266
Fix #77546 iptcembed broken function 2019-01-30 17:09:12 +01:00
Christoph M. Becker
cbc5a141f7 Prepare main branch for PHP 7.2.16 2019-01-30 01:27:57 +01:00
Nikita Popov
ab3c94a54f Merge branch 'PHP-7.2' into PHP-7.3 2019-01-28 09:23:23 +01:00
ekinhbayar
ef68cd3249 Fixed bug #77530: PHP crashes when parsing "(2)::class" 2019-01-28 09:22:18 +01:00
Jakub Zelenka
0da13086bd Merge branch 'PHP-7.2' into PHP-7.3 2019-01-25 14:16:08 +00:00
Jakub Zelenka
dc2ffdeed7 Fix bug #77390 (feof might hang on TLS streams in case of fragmented TLS records)
Simplified version of the fix from Abyl Valg so credit to him.
2019-01-25 14:13:11 +00:00
Nikita Popov
909d0a3d78 Fixed bug #77518 2019-01-25 11:12:34 +01:00
Nikita Popov
f78e681428 Fixed bug #77498
I've renamed the function to the same name as the exported symbol
in master.
2019-01-25 11:01:06 +01:00
Nikita Popov
3c98c2d0cb Fixed bug #77514 2019-01-24 15:13:49 +01:00
Christoph M. Becker
6f3880c62f Improve wording
As suggested by Tom Sommer[1].

[1] <8a4c2f1621 (r32037340)>
2019-01-24 13:09:18 +01:00
Dmitry Stogov
aa9a8dbda3 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #77494 (Disabling class causes segfault on member access)
2019-01-24 13:07:31 +03:00
Dmitry Stogov
73f222d722 Fixed bug #77494 (Disabling class causes segfault on member access) 2019-01-24 13:06:36 +03:00
Christoph M. Becker
19a9a6ba24 Prepare main branch for PHP 7.3.3 2019-01-22 14:04:03 +01:00
Nikita Popov
76760901fa Fixed bug #77287
There may be an EXT_NOP opcode before the parameter list, we should
skip over it.
2019-01-22 12:15:06 +01:00
Anatol Belski
a1b1c53d13 Update NEWS [ci skip] 2019-01-20 16:00:25 +01:00
Anatol Belski
d978590c74 Update NEWS [ci skip] 2019-01-20 15:58:19 +01:00
Christoph M. Becker
1907cbd8b3 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77479: imagewbmp() segfaults with very large images
2019-01-19 10:18:20 +01:00
Christoph M. Becker
44fa0b0f31 Fix #77479: imagewbmp() segfaults with very large images
We must not proceed working with the Wbmp structure, if it hasn't been
allocated.
2019-01-19 10:16:02 +01:00
Nikita Popov
de38ce1a2e Merge branch 'PHP-7.2' into PHP-7.3 2019-01-18 12:05:11 +01:00
Pedro Magalhães
32ae716037 Fixed bug #76675
Leave a reference to the resource in the php_curl.
2019-01-18 12:04:25 +01:00
Jakub Zelenka
766b4fd515 Fix bug #77430 (php-fpm crashes with Main process exited) 2019-01-17 18:37:09 +00:00
Christoph M. Becker
26b5aa8584 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #73614: gdImageFilledArc() doesn't properly draw pies
2019-01-16 20:22:37 +01:00
Christoph M. Becker
61cfa34e11 Fix #73614: gdImageFilledArc() doesn't properly draw pies
The fix for PHP bug 43828[1] changed the algorithm from drawing filled
pies from drawing multiple triangles to drawing a single polygon.  Due
to quirks of the filled polygon drawing algorithm, we had to filter out
extraneous vertices.  This lead, however, to a bug regarding displaced
starting and ending points near 90° and 270° degrees, which we fix by
reinserting these vertices if they had been removed.

This fix is a port of libgd/libgd@1406b1a.

[1] <https://bugs.php.net/bug.php?id=43828>
2019-01-16 20:10:04 +01:00
Dmitry Stogov
1a306cc9a1 Fixed bug #77308 (Unbuffered queries memory leak) 2019-01-14 13:59:30 +03:00
Nikita Popov
c8c5a3ab8a Fixed bug #77447
By disabling asan for CPU support helpers used in ifunc resolvers.
2019-01-14 11:44:48 +01:00
Dmitry Stogov
920450534e Fixed bug #77263 (Segfault when using 2 RecursiveFilterIterator) 2019-01-14 13:18:28 +03:00
Nikita Popov
d6212835f2 Merge branch 'PHP-7.2' into PHP-7.3 2019-01-14 10:23:44 +01:00
Nikita Popov
3ad0ebdf5c Fixed bug #77454 2019-01-14 10:22:48 +01:00
Dmitry Stogov
e089d506d5 Added FFI extension 2019-01-14 11:47:50 +03:00
Sammy Kaye Powers
74c0e580ef Improve openssl_random_pseudo_bytes()
CSPRNG implementations should always fail closed. Now
openssl_random_pseudo_bytes() will fail closed by throwing an
`\Exception` in fail conditions.

RFC: https://wiki.php.net/rfc/improve-openssl-random-pseudo-bytes
2019-01-11 11:16:05 +01:00
Nikita Popov
e6eac08abd Merge branch 'PHP-7.2' into PHP-7.3 2019-01-11 10:29:34 +01:00
Kevin Adler
332b58f865 Fix bug #77361 (configure fails on 64-bit AIX when opcache enabled)
In f904830012, support for GNU Hurd was added to the opcache and
the configure check to ensure the opcache knows the flock struct
layout prior to building was changed check for two cases: BSD layout
and Linux layout. All the existing hard-coded cases in
ZendAccelerator.h follow these two cases, except for 64-bit AIX.
This means that even though building on 64-bit AIX would work,
the configure script refuses to continue.

Add a new configure check for the 64-bit AIX case and a new
compiler definition HAVE_FLOCK_AIX64. Now that all the cases are
covered, simplify the ifdef logic around these three HAVE_FLOCK_*
macros:
- The macOS and the various BSD flavors fall under HAVE_FLOCK_BSD
- Linux, HP-UX, GNU Hurd, 32-bit AIX, and SVR4 environments
  fall under HAVE_FLOCK_LINUX
- 64-bit AIX falls under HAVE_FLOCK_AIX64

The only difference between the existing HAVE_FLOCK_LINUX and
the hard-coded Linux/HP-UX/Hurd case is that the latter
initialized the 5th member to 0, but since the C standard already
says that un-initialized members will be initialized to 0,
it's effectively the same.
2019-01-11 10:21:02 +01:00
Christoph M. Becker
3f9ddeb122 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #73281: imagescale(…, IMG_BILINEAR_FIXED) can cause black border
2019-01-10 16:27:43 +01:00
Christoph M. Becker
6b4cdbaade Fix #73281: imagescale(…, IMG_BILINEAR_FIXED) can cause black border
We port the upstream fixes for libgd/libgd#329 and libgd/libgd#224.
2019-01-10 16:11:23 +01:00
Christoph M. Becker
1e407256f2 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77272: imagescale() may return image resource on failure
2019-01-10 14:25:11 +01:00
Christoph M. Becker
772b1cb245 Fix #77272: imagescale() may return image resource on failure
`_gdScaleHoriz()` and `_gdScaleVert()` may fail, but don't signal
failure since they are void functions.  We change that according to
upstream libgd.

We also remove the unused `Scale()` function, which doesn't exist in
upstream libgd either, right away.
2019-01-10 14:05:09 +01:00
Nikita Popov
00e5d0e859 Merge branch 'PHP-7.2' into PHP-7.3 2019-01-10 10:57:41 +01:00
Nikita Popov
5d33024a5d Fixed bug #77439 2019-01-10 10:57:04 +01:00
Nikita Popov
ade702a0d2 Fixed bug #77434
Mark arrays containing partial arrays as partial. This was already
done for the ADD_ARRAY_ELEMENT case, but not for ASSIGN_DIM.
2019-01-10 10:25:55 +01:00
Christoph M. Becker
c4c6b80b9c Sync NEWS with 7.3.1
All these bugs are fixed in PHP-7.3.1 already.
2019-01-09 11:46:48 +01:00
Lauri Kenttä
63c38c9e49 Fixed bug #77289
Use mysqlnd_restart_psession and mysqlnd_end_psession in PDO MySQL.
This makes sure we free last_message while ZMM is still live.
2019-01-09 09:50:26 +01:00
Sara Golemon
fabade1573
Bump for 7.1.27 2019-01-08 14:17:43 -05:00
Xinchen Hui
cd49db9d47 Fixed bug #77266 (Assertion failed in dce_live_ranges) 2019-01-08 19:19:01 +08:00
Nikita Popov
76c687feaf Fixed bug #77428
mb_ereg_replace historically has not supported escaping backslashes
with backslashes. Go back to that behavior for BC reasons.
2019-01-08 10:21:01 +01:00
Christoph M. Becker
deb88f2269 Fix NEWS
The fixes for bug #77359 and #77360 have been ported to PHP-7.3.1, and
the release has been postponed by one week.
2019-01-07 13:11:04 +01:00
Remi Collet
3e780d7f25 [ci skip] fix NEWS 2019-01-07 11:12:13 +01:00
Remi Collet
03a630ded7 [ci skip] fix NEWS 2019-01-07 11:02:40 +01:00
Stanislav Malyshev
aeec40cb50 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77418 - Heap overflow in utf32be_mbc_to_code
  Add NEWS
  [ci skip] Add NEWS
  Fix more issues with encodilng length
  Fix #77270: imagecolormatch Out Of Bounds Write on Heap
  Fix bug #77380  (Global out of bounds read in xmlrpc base64 code)
  Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
  Fix bug #77370 - check that we do not read past buffer end when parsing multibytes
  Fix #77269: Potential unsigned underflow in gdImageScale
  Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext)
  Fix bug #77242 (heap out of bounds read in xmlrpc_decode())
  Regenerate certs for openssl tests
2019-01-06 23:35:09 -08:00
Stanislav Malyshev
cfe77ea543 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77418 - Heap overflow in utf32be_mbc_to_code
  Add NEWS
  [ci skip] Add NEWS
  Fix more issues with encodilng length
  Fix #77270: imagecolormatch Out Of Bounds Write on Heap
  Fix bug #77380  (Global out of bounds read in xmlrpc base64 code)
  Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
  Fix bug #77370 - check that we do not read past buffer end when parsing multibytes
  Fix #77269: Potential unsigned underflow in gdImageScale
  Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext)
  Fix bug #77242 (heap out of bounds read in xmlrpc_decode())
  Regenerate certs for openssl tests
2019-01-06 23:34:26 -08:00
Stanislav Malyshev
1afebfb3fa Merge branch 'PHP-5.6' into PHP-7.1
* PHP-5.6:
  Fix bug #77418 - Heap overflow in utf32be_mbc_to_code
  [ci skip] Add NEWS
  Fix more issues with encodilng length
  Fix #77270: imagecolormatch Out Of Bounds Write on Heap
  Fix bug #77380  (Global out of bounds read in xmlrpc base64 code)
  Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
  Fix bug #77370 - check that we do not read past buffer end when parsing multibytes
  Fix #77269: Potential unsigned underflow in gdImageScale
  Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext)
  Fix bug #77242 (heap out of bounds read in xmlrpc_decode())
  Regenerate certs for openssl tests
2019-01-06 23:33:34 -08:00
Stanislav Malyshev
9d6c59eeea Fix bug #77418 - Heap overflow in utf32be_mbc_to_code 2019-01-06 23:31:15 -08:00
Stanislav Malyshev
1b7c599a02 Add NEWS 2019-01-06 13:11:55 -08:00
Stanislav Malyshev
fc02e7e3fe Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add NEWS
2019-01-06 13:08:48 -08:00
Stanislav Malyshev
08bb0ce4e4 Add NEWS 2019-01-06 13:08:24 -08:00
Stanislav Malyshev
25c95752d6 Add NEWS 2019-01-06 13:04:51 -08:00
Stanislav Malyshev
b51eaf4166 [ci skip] Add NEWS 2019-01-06 13:03:38 -08:00
Andreas Treichel
3c9af3095c Preserve aspect ratio for width or height 2019-01-05 13:39:49 +01:00
Nikita Popov
361d3ede93 Fix bug #77410 2019-01-04 12:40:28 +01:00
Nikita Popov
07873fab3c Add NEWS entry for bug #77357
The fix has been confirmed.

[ci skip]
2019-01-04 09:07:50 +01:00
Nikita Popov
349dbb7938 Merge branch 'PHP-7.2' into PHP-7.3 2019-01-03 09:40:42 +01:00
Nikita Popov
cb009b12a5 Fixed bug #77273 2019-01-03 09:40:07 +01:00
Anatol Belski
1732ce9c23 Update NEWS 2019-01-02 11:02:29 +01:00
Anatol Belski
7b3f8e746a Fixed bug #75684 In mysqlnd_ext_plugin.h the plugin methods family has no external visibility 2019-01-02 11:00:33 +01:00
Xinchen Hui
1b86f84908 Entry get lost while merging 2019-01-02 16:46:41 +08:00
Xinchen Hui
54a58a7380 Fixed bug #77387 (Recursion detection broken when printing GLOBALS) 2019-01-02 16:42:05 +08:00
Xinchen Hui
e01f08f679 Fixed bug #77376 ("undefined function" message no longer includes namespace) 2019-01-02 15:32:17 +08:00
Xinchen Hui
703ccd5d27 Update NEWS 2019-01-02 12:10:23 +08:00
Xinchen Hui
8ebae84674 Fixed bug #77395 (segfault about array_multisort) 2019-01-02 12:09:47 +08:00
Christoph M. Becker
6f663c3a2e Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77391: 1bpp BMPs may fail to be loaded
2018-12-31 20:50:19 +01:00
Christoph M. Becker
b0cfa28d6d Fix #77391: 1bpp BMPs may fail to be loaded
We port the upstream fix[1].

[1] <d0859134fc>
2018-12-31 20:45:47 +01:00
Anatol Belski
6896d2a685 [ci skip] Update NEWS 2018-12-28 16:40:06 +01:00
Lauri Kenttä
16c62a8179 Fix #77360: class_uses causes segfault 2018-12-27 15:34:02 +01:00
Lauri Kenttä
89bf3df67d Fix #77359: spl_autoload causes segfault
Use the correct function to free the string.
2018-12-27 15:28:25 +01:00
Michael Moravec
f5044a12dd Implement ZEND_ARRAY_KEY_EXISTS opcode to speed up array_key_exists() 2018-12-26 23:54:11 +03:00
Anatol Belski
d2621c3185 Update NEWS [ci skip] 2018-12-26 20:45:19 +01:00
Anatol Belski
b53d2b69f2 Update NEWS [ci skip] 2018-12-26 20:07:31 +01:00
Anatol Belski
a2cb8228fe Update NEWS [ci skip] 2018-12-26 20:05:15 +01:00
Nikita Popov
b1deb98c42 Fixed bug #77338
Set preg_options to 0 in php_pcre_get_compiled_regex(_ex). These
options are intended to be passed to pcre2_match. However, we do
not have any flags that actually need to be set during matching
(all relevant flags are set during compilation), and the preg_flags
value is used for PHP-specific flags instead.

This parameter should be removed entirely in master to avoid confusion.
2018-12-26 17:11:27 +01:00
Dmitry Stogov
ddfb44f2cf Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #77339 (__callStatic may get incorrect arguments)
2018-12-24 13:23:47 +03:00
Dmitry Stogov
7e597f48e9 Fixed bug #77339 (__callStatic may get incorrect arguments) 2018-12-24 13:22:43 +03:00
CHU Zhaowei
b15189f4d8 Fix #77298: segfault occurs when add property to unserialized empty ArrayObject 2018-12-21 17:45:52 +01:00
Christoph M. Becker
b1e25ce319 [ci skip] Add missing entry for bug 77020 2018-12-18 23:23:08 +01:00
Remi Collet
3245d1bb09 missing entry for #77020 2018-12-18 16:29:31 +01:00
Remi Collet
7161fe629d bump to 7.2.15-dev 2018-12-18 13:11:32 +01:00
Christoph M. Becker
8734d6a73d [ci skip] Fix release date 2018-12-18 13:10:03 +01:00
Christoph M. Becker
a65133a17a Prepare main branch for 7.3.2 2018-12-18 12:15:25 +01:00
Scott
e0e08d376e Fix #77297: SodiumException segfaults on PHP 7.3
Instead of trying to clean the argument arrays from the backtrace, we
overwrite them with empty arrays.
2018-12-16 16:36:47 +01:00
Christoph M. Becker
0061db5503 Fix #77291: magic methods inherited from a trait may be ignored
When adding methods from a trait, we must not assume that a method name
with the same length as the name of the using class is either a PHP 4
style constructor, or not a magic method at all – it may well be
another magic method.

We mostly preserve the spirit of the optimization which caused this
regression, and avoid string comparisons for all method names which can
never be magic methods.
2018-12-16 13:30:11 +01:00
BohwaZ
82af24f2b2 Implement SQLite3Stmt::getSQL method, returning the original statement SQL, eventually expanded 2018-12-15 17:27:33 +01:00
Christoph M. Becker
3b0f051193 Allow empty $escape to eschew escaping CSV
Albeit CSV is still a widespread data exchange format, it has never been
officially standardized.  There exists, however, the “informational” RFC
4180[1] which has no notion of escape characters, but rather defines
`escaped` as strings enclosed in double-quotes where contained
double-quotes have to be doubled.  While this concept is supported by
PHP's implementation (`$enclosure`), the `$escape` sometimes interferes,
so that `fgetcsv()` is unable to correctly parse externally generated
CSV, and `fputcsv()` is sometimes generating non-compliant CSV.  Since
PHP's `$escape` concept is availble for many years, we cannot drop it
for BC reasons (even though many consider it as bug).  Instead we allow
to pass an empty string as `$escape` parameter to the respective
functions, which results in ignoring/omitting any escaping, and as such
is more inline with RFC 4180.  It is noteworthy that this is almost no
userland BC break, since formerly most functions did not accept an empty
string, and failed in this case.  The only exception was `str_getcsv()`
which did accept an empty string, and used a backslash as escape
character then (which appears to be unintended behavior, anyway).

The changed functions are `fputcsv()`, `fgetcsv()` and `str_getcsv()`,
and also the `::setCsvControl()`, `::getCsvControl()`, `::fputcsv()`,
and `::fgetcsv()` methods of `SplFileObject`.

The implementation also changes the type of the escape parameter of the
PHP_APIs `php_fgetcsv()` and `php_fputcsv()` from `char` to `int`, where
`PHP_CSV_NO_ESCAPE` means to ignore/omit escaping.  The parameter
accepts the same values as `isalpha()` and friends, i.e. “the value of
which shall be representable as an `unsigned char` or shall equal the
value of the macro `EOF`.  If the argument has any other value, the
behavior is undefined.”  This is a subtle BC break, since the character
`chr(128)` has the value `-1` if `char` is signed, and so likely would
be confused with `EOF` when converted to `int`.  We consider this BC
break to be acceptable, since it's rather unlikely that anybody uses
`chr(128)` as escape character, and it easily can be fixed by casting
all `escape` arguments to `unsigned char`.

This patch implements the feature requests 38301[2] and 51496[3].

[1] <https://tools.ietf.org/html/rfc4180>
[2] <https://bugs.php.net/bug.php?id=38301>
[3] <https://bugs.php.net/bug.php?id=51496>
2018-12-15 14:38:15 +01:00
Christoph M. Becker
8c781c1c20 Resolve imagecropauto() default $mode quirk
The `$mode` parameter of `imagecropauto()` defaults to `-1`.  However,
`-1` is changed to `GD_CROP_DEFAULT` right away, so basically the
default is `GD_CROP_DEFAULT`, which is rather confusing and
unnecessary.

Therefore, we change the default to `IMG_CROP_DEFAULT`, but still allow
an explicit `-1` to be passed for BC reasons, in which case we trigger
a deprecation notice, so we can rid the `-1` support eventually.
2018-12-12 17:25:37 +01:00
Craig Andrews
40c4d7f182 Implement FR #72510: systemd service should be hardened 2018-12-12 17:12:02 +01:00
Xinchen Hui
54739c7e66 Update NEWS 2018-12-11 15:25:19 +08:00
Nikita Popov
93aabf1533 Fixed bug #77275
Instead of juggling with this problem during literal compaction,
make sure that we always initialize Z_EXTRA for literals, which
seems like the more robust solution.
2018-12-10 13:36:23 +01:00
Christopher Jones
8c37d5f451 Add OCI8 changes 2018-12-09 20:56:25 +11:00
Christopher Jones
99f1f3dedf Add oci_set_call_timeout() and bump version to 2.10.0 2018-12-09 20:55:04 +11:00
Pierrick Charron
b3a6ca90af Fix 77264: curl_getinfo returning microseconds, not seconds
Since curl 7.55.0, libcurl introduced new constants to return
more sensible variable types with curl_getinfo.

When curl_getinfo with no option was called, and curl >= 7.55.0, some
of the result were returned as int when they where returned as float
in previous versions. This commit remove this BC Break.

If someone still want to use more sensible variable types, it's always
possible to call curl_getinfo with newer constants.

CURLINFO_CONTENT_LENGTH_DOWNLOAD => CURLINFO_CONTENT_LENGTH_DOWNLOAD_T
CURLINFO_CONTENT_LENGTH_UPLOAD => CURLINFO_CONTENT_LENGTH_UPLOAD_T
CURLINFO_SIZE_DOWNLOAD => CURLINFO_SIZE_DOWNLOAD_T
CURLINFO_SIZE_UPLOAD => CURLINFO_SIZE_UPLOAD_T
CURLINFO_SPEED_DOWNLOAD => CURLINFO_SPEED_DOWNLOAD_T
CURLINFO_SPEED_UPLOAD => CURLINFO_SPEED_UPLOAD_T
CURLINFO_APPCONNECT_TIME => CURLINFO_APPCONNECT_TIME_T
CURLINFO_CONNECT_TIME => CURLINFO_CONNECT_TIME_T
CURLINFO_NAMELOOKUP_TIME => CURLINFO_NAMELOOKUP_TIME_T
CURLINFO_PRETRANSFER_TIME => CURLINFO_PRETRANSFER_TIME_T
CURLINFO_REDIRECT_TIME => CURLINFO_REDIRECT_TIME_T
CURLINFO_STARTTRANSFER_TIME => CURLINFO_STARTTRANSFER_TIME_T
CURLINFO_TOTAL_TIME => CURLINFO_TOTAL_TIME_T
2018-12-08 15:09:43 -05:00
Remi Collet
9b8f2417ad missing entry for #77020 2018-12-08 10:06:19 +01:00
Christopher Jones
78c299ae2d Update NEWS 2018-12-08 19:14:16 +11:00
Christopher Jones
8ff6a30598 Update NEWS 2018-12-08 19:12:04 +11:00
Christoph M. Becker
327e2d0153 [ci skip] Fix NEWS wrt. ChangeLog conversion
We have to be rather picky in this regard; otherwise we need to
manually post process the ChangeLog.
2018-12-06 17:15:43 +01:00
Ferenc Kovacs
c26cb383a5 5.6.40 will be next. probably not 2018-12-05 09:13:30 +01:00
Stanislav Malyshev
78bffa72c1 Fix null pointer deref in qprint-encode filter (bug #77231) 2018-12-03 10:19:08 -08:00
Christoph M. Becker
5be58a437c [ci skip] Prepare NEWS for 7.3 GA 2018-12-03 13:56:14 +01:00
Stanislav Malyshev
48f0f73f75 Fix bug #77143 - add more checks to buffer reads 2018-12-03 00:41:46 -08:00
Stanislav Malyshev
7edc639b9f Fix #77020: null pointer dereference in imap_mail
If an empty $message is passed to imap_mail(), we must not set message
to NULL, since _php_imap_mail() is not supposed to handle NULL pointers
(opposed to pointers to NUL).
2018-12-03 00:00:56 -08:00
Stanislav Malyshev
69f5e7992b Fix bug #77022 - use file mode or umask for new files 2018-12-01 21:06:45 -08:00
Christoph M. Becker
f0f4ab4b02 [ci skip] Fix names of the constants
`GD_CROP_DEFAULT` and `GD_CROP_SIDES` are names of libgd constants, and
as such they are not relevant for userland developers.  Therefore, we
replace them by the constant names of our wrapper, i.e.
`IMG_CROP_DEFAULT` and `IMG_CROP_SIDES`, respectively.
2018-12-01 23:54:17 +01:00
Christoph M. Becker
dcad13e8c9 Fix #73291: imagecropauto() $threshold differs from external libgd
Since upstream does not appear to move in any way[1], we sync our
behavior.  Even though the BC break is ugly (which is the reason we
target master only), having to deal with different algorithms is even
worse for portable userland code.

[1] <https://github.com/libgd/libgd/issues/334>
2018-12-01 18:49:30 +01:00
Anatol Belski
ea454583eb Update NEWS [ci skip] 2018-12-01 17:10:43 +01:00
Christoph M. Becker
947ca9f43d Sync behavior of gdImageAutoCrop() with upstream
Since cropping support has been added to our bundled libgd,
`gdImageAutoCrop` differs from upstream in that `GD_CROP_DEFAULT` falls
back on `GD_CROP_SIDES` if there is no transparent color in the image.
While this difference seem to be a useful improvement in our bundled
libgd, upstream has not yet signaled that there willing to back-port
it[1], so we revert it to stay in sync with upstream.

We also remove the additional NULL bailout at the end of the function,
which doesn't appear to be relevant any longer since bug 77198 has been
fixed.

[1] <https://github.com/libgd/libgd/issues/298>
2018-12-01 15:34:10 +01:00
Christoph M. Becker
a757ebb5b5 Require SQLite ≥ 3.7.4 for ext/sqlite3
`SQLite3::readOnly()` uses `sqlite3_stmt_readonly()` which is only
available as of libsqlite 3.7.4.  For older SQLite3 versions we return
always `false`, which can be confusing.  Instead of sticking with this
behavior, or even undefining the method for old SQLite3 versions, we
lift the requirements to SQLite 3.7.4 (released on 2010-12-08),
according to a respective discussion[1].

Since pdo_sqlite doesn't use `sqlite3_stmt_readonly()`, we stick with
the minimum requirement of SQLite 3.5.0.

[1] <https://github.com/php/php-src/pull/3614>
2018-11-29 15:10:39 +01:00
Christoph M. Becker
471eb0dd95 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77051: Issue with re-binding on SQLite3
2018-11-29 02:18:56 +01:00
BohwaZ
94ec262fca Fix #77051: Issue with re-binding on SQLite3
We have to call `sqlite3_reset()` before re-binding the parameters.
2018-11-29 02:16:57 +01:00
Christoph M. Becker
035de21d77 Deny (un)serialization of SQLite3, SQLite3Stmt and SQLite3Result
Serializing `SQLite3`, `SQLite3Stmt` and `SQLite3Result` instances is
possible but pointless, since unserializing results in uninitialized
instances, which will bail out of any method call.  Therefore, we deny
serialization and unserialization in the first place.
2018-11-29 01:08:03 +01:00
Derick Rethans
a3f2871b8e Fixed bug #77097 (DateTime::diff gives wrong diff when the actual diff is less than 1 second) by upgrading to timelib 2017.09 2018-11-28 20:34:21 +00:00
Nikita Popov
f4eec70260 Merge branch 'PHP-7.2' into PHP-7.3 2018-11-28 20:10:17 +01:00
Nikita Popov
17f8b9fb36 Fixed bug #77215
Remove invalid assertion: A block can have multiple switch frees,
so if we don't do live range block splitting, it is not necessarily
true that the free is located at the start of a block.
2018-11-28 20:08:39 +01:00
Nikita Popov
d78211aec0 Merge branch 'PHP-7.2' into PHP-7.3 2018-11-27 16:39:21 +01:00
Nikita Popov
d6595f276f Fixed bug #76046
Place FE_FREE on start line of foreach, instead of whatever random
line number might be in CG(zend_lineno) at the time.
2018-11-27 16:37:55 +01:00
Nikita Popov
fb18b8bdf6 Merge branch 'PHP-7.2' into PHP-7.3 2018-11-26 22:49:18 +01:00
Colin Basnett
9ec519e094 Fixed bug #77184
The U in URATIONAL is for unsigned, so the values should be printed
as unsigned.
2018-11-26 22:48:48 +01:00
Adam Baratz
2c4425a87a update NEWS 2018-11-26 10:39:24 -05:00
Sergei Morozov
e126ca1557 Check column number before trying to fetch the value 2018-11-26 10:34:37 -05:00
Christoph M. Becker
070f6838db Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77200: imagecropauto(…, GD_CROP_SIDES) crops left but not right
2018-11-25 19:03:38 +01:00
Christoph M. Becker
a1aaec08b5 Fix #77200: imagecropauto(…, GD_CROP_SIDES) crops left but not right
We apply the upstream patch[1].

[1] <6613094e5d>
2018-11-25 19:00:50 +01:00
Christoph M. Becker
d2a1839d82 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77198: auto cropping has insufficient precision
2018-11-25 15:56:35 +01:00
Christoph M. Becker
b47b8886dd Fix #77198: auto cropping has insufficient precision
We apply the upstream patch[1], and also fix the erroneous bailout at
the end of `gdImageAutoCrop()`, since `crop.x` and `crop.y` may very
well be zero.

[1] <bda85aaeeb>
2018-11-25 15:41:27 +01:00
Christoph M. Becker
caabf3a1bb Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77195: Incorrect error handling of imagecreatefromjpeg()
2018-11-24 12:57:44 +01:00
Christoph M. Becker
60a9f7a3a3 Fix #77195: Incorrect error handling of imagecreatefromjpeg()
The broken JPEG image triggers a notice, two warnings and outputs a
message to stderr directly.  The additional notice is pretty useless,
and the direct output to stderr is bad.  Therefore, we port the
relevant differences from upstream to our bundled libgd.  This leaves
us with two warnings; the first one is triggered by libjpeg and shows
the actual problem, the second one is triggered by our libgd wrapper
whenever an image can't be read, what may not have necessarily
triggered a warning before.
2018-11-24 12:52:08 +01:00
Christoph M. Becker
2979c6a56d [ci skip] Preliminary fix for NEWS
No more regular bug fixes for PHP 7.3.0.

We'll clean up the rest later.
2018-11-23 18:37:12 +01:00
Christoph M. Becker
b0a86566dc Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77177: Serializing or unserializing COM objects crashes
2018-11-23 16:36:00 +01:00
Christoph M. Becker
115ee49b0b Fix #77177: Serializing or unserializing COM objects crashes
Firstly, we avoid returning NULL from the get_property handler, but
instead return an empty HashTable, which already prevents the crashes.
Secondly, since (de-)serialization obviously makes no sense for COM,
DOTNET and VARIANT objects (at least with the current implementation),
we prohibit it right away.
2018-11-23 16:32:33 +01:00
Sara Golemon
0b3cbd665e
Prep for 7.1.26 2018-11-21 14:37:37 -05:00