Pieter van den Ham
06ade15528
Fix #79934 : CRLF-only line in heredoc causes parsing error
...
Fixes the function `next_newline()` in zend_language_scanner.l. The
function now correctly returns a newline_len of 2 for "\r\n".
Closes GH-5944.
2020-08-06 12:02:54 +02:00
Nikita Popov
6a1bd57df5
Fix memory leak on socket_sendmsg() / socket_recvmsg() error
2020-08-05 16:41:40 +02:00
Nikita Popov
da786a22af
Fixed bug #79930
...
We're inserting src_zval, so that's what we should addref.
2020-08-05 15:43:41 +02:00
David Carlier
12db8b90a7
Fix iov_base pointer type for illumos
...
These systems has two versions of the iovec interface dependent on
compiler flags passed, the legacy version causing little build issue.
Closes GH-5939.
2020-08-05 15:17:51 +02:00
Christoph M. Becker
c4677af67e
[ci skip] Fix 7.3.21 release date
2020-08-04 12:31:24 +02:00
Remi Collet
4221e000b1
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
bump version to 7.2.34-dev
Update NEWS
2020-08-04 09:55:40 +02:00
Remi Collet
6b8ffdbdeb
bump version to 7.2.34-dev
2020-08-04 09:55:29 +02:00
Graham Campbell
f3a43e85e7
Removed space from bug55086.phpt
...
Closes GH-5923.
2020-08-03 15:14:15 +02:00
Santiago M. Mola
fdf6b0fefe
set -ex on travis/compile.sh
...
-e to fail early: ./configure may fail and further errors from make bury
the original problem in the logs.
-x for easier debugging
2020-08-03 14:48:00 +02:00
Christoph M. Becker
17d64af186
[ci skip] Add missing NEWS entries
2020-08-03 11:18:18 +02:00
Stanislav Malyshev
07aeb9171d
Update NEWS
2020-08-03 01:14:38 -07:00
Stanislav Malyshev
5b29af5c78
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #79877 : getimagesize function silently truncates after a null byte
Fix #79797 : Use of freed hash key in the phar_parse_zipfile function
2020-08-02 23:56:37 -07:00
Christoph M. Becker
ff577b04c0
Fix #79877 : getimagesize function silently truncates after a null byte
...
We have to check for NUL bytes if `getimagesize()` has been called.
2020-08-02 15:33:24 -07:00
Christoph M. Becker
7355ab8176
Fix #79797 : Use of freed hash key in the phar_parse_zipfile function
...
We must not use heap memory after we freed it.
2020-08-02 15:31:29 -07:00
Christoph M. Becker
1e0bc6e30f
Fix #79919 : Stack use-after-scope in define()
...
Instead of the temporary `rv`, we use the `val_free` which is there for
this purpose.
2020-07-31 10:54:41 +02:00
Christoph M. Becker
d95c53834c
Amendment to OPcache base file removal
...
We fix the erroneous segment size. We also keep the segment pointer at
the allocated address, but increase the position instead.
2020-07-29 18:44:08 +02:00
Nikita Popov
57ad5b3432
Consider op1 literal of FETCH_OBJ_R
...
FETCH_OBJ_R may have an op1 CONST operand, even though it will
always error. We should take this into account when compacting
literals.
2020-07-29 17:04:23 +02:00
Nikita Popov
99c48a2477
Fix test
2020-07-29 15:04:05 +02:00
Santiago M. Mola
e767ca60a0
Fix #79895 : support = in PHP_CHECK_GCC_ARG m4 macro
...
Closes GH-5890.
2020-07-29 12:36:52 +02:00
twosee
0b8c83f593
Handle bindto error
...
Closes GH-5903.
2020-07-29 17:46:27 +08:00
Christoph M. Becker
9a744c66e7
Fix #73060 : php failed with error after temp folder cleaned up
...
Instead of storing the mapping base address and the address of
`execute_ex()` in a separate file in the temporary folder, we store
them right at the beginning of the memory mapping.
2020-07-29 10:07:23 +02:00
Christoph M. Becker
c756f82c02
Fix #79806 : realpath() erroneously resolves link to link
...
After resolving reparse points, the path still may be a reparse point;
in that case we have to resolve that reparse point as well.
2020-07-28 13:55:22 +02:00
Paweł Tomulik
efe6d96b45
fix memory leaks in ext/ldap/ldap.c
2020-07-28 10:23:10 +02:00
Christoph M. Becker
1aeff522b8
Revert "Fix #79806 : realpath() erroneously resolves link to link"
...
This reverts commit d5b59b4303 .
2020-07-27 17:50:41 +02:00
Christoph M. Becker
d5b59b4303
Fix #79806 : realpath() erroneously resolves link to link
...
After resolving reparse points, the path still may be a reparse point;
in that case we have to resolve that reparse point as well.
2020-07-27 15:08:39 +02:00
Christoph M. Becker
6f18d7e2f9
Fix #77932 : File extensions are case-sensitive
...
The file extension to mime type mapping *must* not depend on the file
extension's case for case-insensitive file systems, and *should* not
for case-sensitive file systems.
2020-07-27 11:52:18 +02:00
George Wang
874284d1c9
Merge branch 'PHP-7.2' into PHP-7.3
2020-07-23 15:36:35 -04:00
George Wang
c39f5fe94e
Security: update to LiteSpeed SAPI v7.7 to address an buffer overflow, and some log message tunings.
2020-07-23 15:35:32 -04:00
Christoph M. Becker
15efb96d4c
Fix #79884 : PHP_CONFIG_FILE_PATH is meaningless
...
It does not make sense to make assumptions about `PHP_CONFIG_FILE_PATH`
during build time, since that value is never used during run time on
Windows. Since there is no `--with-config-file-path` on Windows
either, we define `PHP_CONFIG_FILE_PATH` as `""`.
2020-07-23 15:39:22 +02:00
Christoph M. Becker
6b99a8be4d
Fix brittle test
...
This test fails occasionally due to timing issues, because the session
file may have been unlinked by the first `session_start()`'s GC. We
adapt the test expectation to this reality.
2020-07-22 20:45:56 +02:00
Christoph M. Becker
2c0a6977dd
7.3 is now 7.3.22-dev
2020-07-21 09:18:07 +02:00
Christoph M. Becker
b2e3fd1e69
Fix #63527 : DCOM does not work with Username, Password parameter
...
We must not mix multibyte and wide character strings in the
`COAUTHIDENTITY` structure. Using wide character strings throughout
would have the advantage that the remote connection can be established
regardless of the code page of the server, but that would more likely
break BC, so we just drop the wide character string conversion of the
username.
2020-07-20 14:43:29 +02:00
Andy Postnikov
2c57378bd3
Fix bug #78008 : dns_check_record() always return true on Alpine
...
- free handle before return result
- cleaned up remaining usage of MAXPACKET
- update dns_get_mx() to use the same approach
Closes GH-5854.
2020-07-15 15:10:19 +02:00
Evgeny Stepanischev
ce149b0cb8
Fixed bug #79849
...
Closes GH-5853.
2020-07-14 12:41:43 +02:00
twosee
f0b2c2cb98
Fixed BC break of php_debug_zval_dump
...
It introduced by fixing bug #79830
2020-07-11 18:30:28 +08:00
twosee
56dec3cc73
Fixed bug #79830 introduced by fixing bug #79821
...
This also fixes memory error in debug_zval_dump and var_export.
2020-07-11 14:37:25 +08:00
twosee
150504e6b1
Fixed bug #79821
...
HashTable was reallocated (zend_hash_packed_grow) during php_var_dump, so we should call GC_ADDREF to make SEPARATE_ARRAY work.
Closes GH-5837.
2020-07-11 06:14:22 +08:00
Nikita Popov
a72c53a070
Fixed bug #79817
...
Use *_IND macros in a few places in string.c.
2020-07-10 14:06:41 +02:00
Paweł Tomulik
23ef0a1285
Fix some memory bugs in ldap.c
2020-07-09 18:35:00 +02:00
XXiang
3d5de7d746
Fix bug #79787
...
Closes GH-5807.
2020-07-08 11:20:58 +02:00
Nikita Popov
e6160e99d8
Report len as -1 instead of INT_MAX
...
Per docs it should be -1. And would be on 32-bit systems, but
not on 64-bit systems.
(cherry picked from commit 39111585a2 )
2020-07-08 10:38:11 +02:00
Sara Golemon
e54f18ae0f
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Prep for 7.2.33
Prep NEWS for 7.2.32 release
2020-07-07 19:33:48 +00:00
Sara Golemon
c68d48de9e
Prep for 7.2.33
2020-07-07 19:32:15 +00:00
Sara Golemon
9588c8474e
Prep NEWS for 7.2.32 release
2020-07-07 19:31:05 +00:00
Christoph M. Becker
f23bd48892
Don't use deprecated curly brace offset syntax
...
(cherry picked from commit 7ec3aa1871 )
Better safe than sorry in case someone ever builds PHP 7.3 with a
future version of PHP SDK with bundled PHP 8.
2020-07-07 13:55:08 +02:00
Nikita Popov
64931fd3c4
Fixed bug #79792
...
We need to remove the iterators even if the array is empty (we
will not create one if the first place, but the array may become
empty after the fact).
2020-07-07 11:58:25 +02:00
Nikita Popov
b765f96f5f
Fixed bug #79778
...
In the interest of avoiding side-effects during dumping, I'm
replacing the value with a <constant ast> string instead of
performing an update constant operation.
2020-07-07 10:19:39 +02:00
Nikita Popov
187a72d563
Remove bogus generator iterator dtor
...
Fixes a use-after-free encountered in Symfony's SecurityBundle.
I don't have a reproducer for this, and believe the issue can only
occur if we leak an iterator (the leak is a separate issue).
We should not free the generator iterator here, because we do not
own it. The code that fetched the iterator is responsible for
releasing it. In the rare case where we do hit this code-path,
we cause a use-after-free.
2020-06-30 17:32:42 +02:00
Nikita Popov
fc6f53d426
Fix leak when setting cyclic previous exception in finally
...
A curious exception handling pattern found in Symfony's HttpClient.
2020-06-30 12:24:32 +02:00
Christoph M. Becker
7f3bc64287
Fix #70362 : Can't copy() large 'data://' with open_basedir
...
open_basedir is only relevant for plain files, so there is no need to
check it for other URL wrappers.
2020-06-30 10:46:53 +02:00