Miriam Lauter [Mon, 18 Mar 2019 16:47:18 +0000 (12:47 -0400)]
Fix #77767: phpdbg break command help message shows incorrect aliases
Previously the aliases for at and del were listed as A and d
in the help message for break. This patch corrects the aliases
to be @ and ~ respectively.
twosee [Sat, 16 Mar 2019 05:21:48 +0000 (13:21 +0800)]
Don't disable object slot reuse while running shutdown functions
We only need to do this once we're running destructors. The current
approach interferes with some event loop code that runs everything
inside a shutdown function.
Nikita Popov [Thu, 14 Mar 2019 16:24:50 +0000 (17:24 +0100)]
Fixed bug #77742
By avoiding integer overflow in the implementation entirely. The
multiplication was already explicitly checked for overflow, so also
add a check for the addition and remove the overflow checks after
the calculation.
Anatol Belski [Thu, 28 Feb 2019 11:48:47 +0000 (12:48 +0100)]
Sync with behavior change in OpenSSL 1.1.1b
A behavior change in revealed by some openssl_decrypt() based test,
where an encrypt API is used with a decrypt context. The EVP_Cipher*
functions will automatically choose the right operation depending on the
context passed.
Peter Kokot [Sun, 17 Feb 2019 13:21:58 +0000 (14:21 +0100)]
Update editorconfig
Changes:
- New property max_line_length
- COMMIT_EDITMSG file added when writing commit messages
- Markdown files can have trimmed trailing whitespace also to simplify
settings.
- https link used to EditorConfig page.
- Added also *.y, *.cpp, and *.inc files
- The tab_width moved to a new all files section
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.
In order to rename safer, we do the following:
- set umask to 077 (unfortunately, not TS, so excluding ZTS)
- chown() first, to set proper group before allowing group access
- chmod() after, even if chown() fails
Nikita Popov [Mon, 4 Mar 2019 12:11:12 +0000 (13:11 +0100)]
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.
Kevin Adler [Mon, 18 Feb 2019 17:01:23 +0000 (11:01 -0600)]
Fix shared module generation on AIX bug #77676
Makefiles for PHP extensions generated by phpize expect the PHP_MODULES
to contain a list of libtool .la files so that it can read the $dlname
variable from them by sourcing them in to a shell. On AIX, the code was
setting PHP_MODULES to a list of .so files, which meant the dlname was
blank, preventing the tests from being able to run.
Change the AIX code path in the PHP_SHARED_MODULE macro to match the
output on other platforms, using libtool .la files.
Ralf Habacker [Fri, 1 Mar 2019 21:32:01 +0000 (22:32 +0100)]
Fix #77609: Tests from mailparse extension fails
Add installed php extensions to temporary created ini file
In php extensions configured with phpize, a temporarily generated
php.ini is used for testing, but currently contains no installed
PHP extensions, which is required by the mailparse extension,
for example.
Installed extensions must be added with their absolute path,
because the extension_dir parameter is already occupied.
Jay Satiro [Fri, 1 Mar 2019 06:37:00 +0000 (01:37 -0500)]
curl_error: return an empty string if no error occurred
CURLOPT_ERRORBUFFER doc says "Do not rely on the contents of the
buffer unless an error code was returned." [1]
Prior to this change the error buffer was returned even if no error had
occurred, and that buffer may contain incorrect information in such a
case. [2]
Anatol Belski [Thu, 28 Feb 2019 11:48:47 +0000 (12:48 +0100)]
Sync with behavior change in OpenSSL 1.1.1b
A behavior change in revealed by some openssl_decrypt() based test,
where an encrypt API is used with a decrypt context. The EVP_Cipher*
functions will automatically choose the right operation depending on the
context passed.
Nikita Popov [Thu, 21 Feb 2019 12:42:47 +0000 (13:42 +0100)]
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.
Nikita Popov [Mon, 18 Feb 2019 13:01:45 +0000 (14:01 +0100)]
Make MADV_HUGEPAGE conditional on USE_ZEND_ALLOC_HUGE_PAGES
There have been multiple reports of large slowdowns due to the
use of MADV_HUGEPAGE, so make it conditional on
USE_ZEND_ALLOC_HUGE_PAGES, just like MAP_HUGETLB already is.
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 *`).
Peter Kokot [Wed, 26 Sep 2018 17:29:25 +0000 (19:29 +0200)]
Refactor timelib.m4
The ext/date/lib is bundled library and also includes additional
timelib.m4 macros and checks specific for PHP.
All the checks in the timelib.m4 are already done in the PHP's
configure.ac:
- headers except for io.h and strings.h
- two functions checked strftime and gettimeofday
- if size of longint is 8
- if size of int is 4
- int32_t and uint32_t types using the PHP_CHECK_STDINT_TYPES
Macro `AC_TIMELIB_C_BIGENDIAN` defined in timelib.m4 is not used.
The two checkings for strtoll and atoll have been moved to date extension's
config0.m4 file.
Additional check for headers <io.h> and <strings.h> has been added to
config0.m4 of the date extension.
Therefore the timelib.m4 can be simplified and removed from the bundled
library to have easier maintenance in the later branches and also
upstream library.
Nikita Popov [Tue, 12 Feb 2019 08:54:52 +0000 (09:54 +0100)]
Remove "defensive copy" of DatePeriod properties
get_properties() constructs these as fresh objects with no relation
to the internals, there is no need to clone them again. Additionally
the current implementation leaks memory, because the original objects
are never freed (see PR #3121).
Ben Ramsey [Sun, 10 Feb 2019 18:25:19 +0000 (12:25 -0600)]
Fixed bug #77564: Memory leak in exif_process_IFD_TAG
The memory leak occurs when more than one UserComment tag is present in
the EXIF data. It's still considered corrupt EXIF data, but this ensures
the memory is freed before trying to set to already allocated memory.
Darek Slusarczyk [Mon, 11 Feb 2019 16:16:49 +0000 (17:16 +0100)]
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
YanTao [Fri, 8 Feb 2019 03:41:41 +0000 (11:41 +0800)]
Fix FTPS passive mode of data channel event poll
Bugfix: when using passive mode of FTPS protocol, data channel events
should be polled when creating data connection channel, instead of polling
the event of ftp's self control channel, which may cause ftp transfer
problem while using ftps and passive mode.