]> granicus.if.org Git - php/log
php
8 years agoFixed parsing of AM/PM without all the expected dots in place
Derick Rethans [Fri, 30 Sep 2016 19:21:48 +0000 (20:21 +0100)]
Fixed parsing of AM/PM without all the expected dots in place

8 years agoFix #73203: passing additional_parameters causes mail to fail
Christoph M. Becker [Fri, 30 Sep 2016 09:05:53 +0000 (11:05 +0200)]
Fix #73203: passing additional_parameters causes mail to fail

We make sure that there's no unsigned underflow, which happened for `y==0`.

8 years ago5.6.28 is next
Ferenc Kovacs [Wed, 28 Sep 2016 22:55:36 +0000 (00:55 +0200)]
5.6.28 is next

8 years agoUpdated to version 2016.7 (2016g)
Derick Rethans [Wed, 28 Sep 2016 22:30:26 +0000 (23:30 +0100)]
Updated to version 2016.7 (2016g)

8 years agoHandle resource keys in constexpr arrays
Nikita Popov [Wed, 28 Sep 2016 21:11:02 +0000 (23:11 +0200)]
Handle resource keys in constexpr arrays

8 years agoFix the constant array case as well
Nikita Popov [Wed, 28 Sep 2016 21:05:21 +0000 (23:05 +0200)]
Fix the constant array case as well

8 years agoCheck next_index_insert failure in ADD_ARRAY_ELEMENT
Nikita Popov [Wed, 28 Sep 2016 20:33:40 +0000 (22:33 +0200)]
Check next_index_insert failure in ADD_ARRAY_ELEMENT

8 years agoFix #53745: cgi.discard_path option is missing from php.ini
Christoph M. Becker [Mon, 26 Sep 2016 16:16:50 +0000 (18:16 +0200)]
Fix #53745: cgi.discard_path option is missing from php.ini

Also cgi.check_shebang_line has been missing.

8 years agoupdate libs_versions.txt
Anatol Belski [Mon, 26 Sep 2016 13:39:01 +0000 (15:39 +0200)]
update libs_versions.txt

8 years agoFix test_image_equals_file() wrt. palette images
Christoph M. Becker [Sun, 25 Sep 2016 08:30:48 +0000 (10:30 +0200)]
Fix test_image_equals_file() wrt. palette images

The recently introduced test_image_equals_file() doesn't properly work for
palette images, because in this case only the palette indexes are compared,
what can lead to false positives and negatives as shown in the added test.

To fix that we convert palette images to truecolor, what is supposed to be
faster than calling imagecolorsforindex() for each pixel.

We furthermore rely on PHP's refcounting to free unused images; after all,
this is not C.

8 years agoMerge branch 'pull-request/2120' into PHP-5.6
Christoph M. Becker [Sat, 24 Sep 2016 15:52:15 +0000 (17:52 +0200)]
Merge branch 'pull-request/2120' into PHP-5.6

8 years agoFix #73161: imagecreatefromgd2() may leak memory
Christoph M. Becker [Sat, 24 Sep 2016 10:36:54 +0000 (12:36 +0200)]
Fix #73161: imagecreatefromgd2() may leak memory

8 years agoFix #73159: imagegd2(): unrecognized formats may result in corrupted files
Christoph M. Becker [Sat, 24 Sep 2016 09:28:20 +0000 (11:28 +0200)]
Fix #73159: imagegd2(): unrecognized formats may result in corrupted files

We must not apply the format correction twice for truecolor images.

8 years agoFix #73155: imagegd2() writes wrong chunk sizes on boundaries
Christoph M. Becker [Fri, 23 Sep 2016 22:46:35 +0000 (00:46 +0200)]
Fix #73155: imagegd2() writes wrong chunk sizes on boundaries

8 years agoFix #73157 (again): imagegd2() ignores 3rd param if 4 are given
Christoph M. Becker [Fri, 23 Sep 2016 22:35:24 +0000 (00:35 +0200)]
Fix #73157 (again): imagegd2() ignores 3rd param if 4 are given

Obviously, there was a bad merge.

8 years agoRevert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"
Anatol Belski [Fri, 23 Sep 2016 16:45:03 +0000 (18:45 +0200)]
Revert "Fixed bug #73037 SoapServer reports Bad Request when gzipped"

This reverts commit f9a699f6c3aa7acea922242a0f14731f6b829742.

8 years agoskip this test for now as it seems to have issues running dev server
Anatol Belski [Fri, 23 Sep 2016 16:07:08 +0000 (18:07 +0200)]
skip this test for now as it seems to have issues running dev server

8 years agoFixed bug #73037 SoapServer reports Bad Request when gzipped
Anatol Belski [Fri, 23 Sep 2016 14:02:50 +0000 (16:02 +0200)]
Fixed bug #73037 SoapServer reports Bad Request when gzipped

(cherry picked from commit 410c68788ae4826807e8ced3f4a02e676142b22a)

8 years agoUpdate NEWS
Christoph M. Becker [Fri, 23 Sep 2016 14:23:58 +0000 (16:23 +0200)]
Update NEWS

8 years agoFormatting. Fix possible memory corruption in FPM SHM management
Julien Pauli [Fri, 23 Sep 2016 11:24:31 +0000 (13:24 +0200)]
Formatting. Fix possible memory corruption in FPM SHM management

8 years agofix every work call mmap
tom916 [Fri, 16 Sep 2016 14:37:09 +0000 (22:37 +0800)]
fix every work call mmap

fix fpm_scoreboard_free

8 years agoRework FreeType related tests
Christoph M. Becker [Thu, 22 Sep 2016 09:52:10 +0000 (11:52 +0200)]
Rework FreeType related tests

Firstly, there is no fundamental difference between running the tests on
freetype before and after 2.4.10, so we re-join the respective test cases.

Secondly, there are some minor differences in the results depending on
architecture, freetype versions and config options, so we cater to that
by allowing small deviations from the expectations.

8 years agoupdate libs versions
Anatol Belski [Thu, 22 Sep 2016 15:01:02 +0000 (17:01 +0200)]
update libs versions

8 years agofix bug related to #865
Márcio Almada [Mon, 19 Sep 2016 16:42:07 +0000 (12:42 -0400)]
fix bug related to #865

In case USE_KEY flag is active, RegexIterator->accept() should keep it's
old behavior which is to accept keys mapping arrays.

This broke after PHP 5.5 but was not noticed due to lack of tests for USE_KEY.

8 years agoFixed inconsistent meaning of zend_startup_module_ex() return value used in zend_hash...
Dmitry Stogov [Tue, 20 Sep 2016 09:29:57 +0000 (12:29 +0300)]
Fixed inconsistent meaning of zend_startup_module_ex() return value used in zend_hash_apply()

8 years agoMerge branch 'pull-request/1845' into PHP-5.6
Christoph M. Becker [Mon, 19 Sep 2016 23:05:57 +0000 (01:05 +0200)]
Merge branch 'pull-request/1845' into PHP-5.6

8 years agoFix wrong year in previous commit.
George Wang [Mon, 19 Sep 2016 14:46:46 +0000 (10:46 -0400)]
Fix wrong year in previous commit.

8 years agoDo not wrap user exception in case of custom JSON serialization
Julien Pauli [Mon, 19 Sep 2016 14:06:12 +0000 (16:06 +0200)]
Do not wrap user exception in case of custom JSON serialization

8 years agoFix #73100: session_destroy null dereference in ps_files_path_create
Christoph M. Becker [Fri, 16 Sep 2016 21:41:10 +0000 (23:41 +0200)]
Fix #73100: session_destroy null dereference in ps_files_path_create

8 years agoUpdte NEWS
Xinchen Hui [Fri, 16 Sep 2016 12:55:37 +0000 (20:55 +0800)]
Updte NEWS

8 years agoFixed bug #72505 (readfile() mangles files larger than 2G)
Xinchen Hui [Tue, 28 Jun 2016 03:11:25 +0000 (11:11 +0800)]
Fixed bug #72505 (readfile() mangles files larger than 2G)

8 years agoFix #73003: Integer Overflow in gdImageWebpCtx of gd_webp.c
Christoph M. Becker [Fri, 16 Sep 2016 09:31:21 +0000 (11:31 +0200)]
Fix #73003: Integer Overflow in gdImageWebpCtx of gd_webp.c

We add the missing integer overflow check to avoid potential buffer overflows.

8 years agofix test (32bits)
Remi Collet [Thu, 15 Sep 2016 13:32:39 +0000 (15:32 +0200)]
fix test (32bits)

8 years agofix ZTS build
Remi Collet [Thu, 15 Sep 2016 11:27:20 +0000 (13:27 +0200)]
fix ZTS build

8 years agoupdate NEWS
Ferenc Kovacs [Thu, 15 Sep 2016 09:35:46 +0000 (11:35 +0200)]
update NEWS

8 years agoFix and reactivate regression test for bug #50194
Christoph M. Becker [Wed, 14 Sep 2016 22:34:55 +0000 (00:34 +0200)]
Fix and reactivate regression test for bug #50194

Apparently, different FreeType versions render the string differently, so
we have to cater to these slight differences. Unfortunately, the testing
framework doesn't yet offer a clean API for this, so we work around the
limitations by parsing and checking the output of test_image_equals_file().

8 years agoSkip ext/gd/tests/bug50194.phpt for now
Christoph M. Becker [Wed, 14 Sep 2016 18:00:30 +0000 (20:00 +0200)]
Skip ext/gd/tests/bug50194.phpt for now

There are apparently issues with the font rendering with different freetype
version; I'll have a look at this issue ASAP.

8 years agoFix #50194: imagettftext broken on transparent background w/o alphablending
Christoph M. Becker [Wed, 14 Sep 2016 12:59:17 +0000 (14:59 +0200)]
Fix #50194: imagettftext broken on transparent background w/o alphablending

We must not draw the background pixels of the character glyphs, what has
already been fixed in GD 2.0.26.

8 years agoFix bug #73072 (Invalid path SNI_server_certs causes segfault)
Jakub Zelenka [Tue, 13 Sep 2016 17:15:34 +0000 (18:15 +0100)]
Fix bug #73072 (Invalid path SNI_server_certs causes segfault)

8 years agoMerge branch 'pull-request/2126' into PHP-5.6
Christoph M. Becker [Tue, 13 Sep 2016 13:57:39 +0000 (15:57 +0200)]
Merge branch 'pull-request/2126' into PHP-5.6

8 years agoadd test for bug #73068
Anatol Belski [Tue, 13 Sep 2016 13:28:28 +0000 (15:28 +0200)]
add test for bug #73068

8 years agofix test portability
Anatol Belski [Tue, 13 Sep 2016 10:00:29 +0000 (12:00 +0200)]
fix test portability

8 years agomissed semicolon
Anatol Belski [Tue, 13 Sep 2016 08:50:44 +0000 (10:50 +0200)]
missed semicolon

8 years agofix C89 conformity
Anatol Belski [Tue, 13 Sep 2016 08:43:51 +0000 (10:43 +0200)]
fix C89 conformity

8 years agoFix bug #72293 - Heap overflow in mysqlnd related to BIT fields
Stanislav Malyshev [Tue, 13 Sep 2016 03:25:08 +0000 (20:25 -0700)]
Fix bug #72293 - Heap overflow in mysqlnd related to BIT fields

8 years agoFix test
Stanislav Malyshev [Tue, 13 Sep 2016 03:12:41 +0000 (20:12 -0700)]
Fix test

8 years agoFix bug #73065: Out-Of-Bounds Read in php_wddx_push_element of wddx.c
Stanislav Malyshev [Mon, 12 Sep 2016 07:35:01 +0000 (00:35 -0700)]
Fix bug #73065: Out-Of-Bounds Read in php_wddx_push_element of wddx.c

8 years agoFix bug #73035 (Out of bound when verify signature of tar phar in phar_parse_tarfile)
Stanislav Malyshev [Mon, 12 Sep 2016 04:37:44 +0000 (21:37 -0700)]
Fix bug #73035 (Out of bound when verify signature of tar phar in phar_parse_tarfile)

8 years agoFix bug #73052 - Memory Corruption in During Deserialized-object Destruction
Stanislav Malyshev [Mon, 12 Sep 2016 04:19:29 +0000 (21:19 -0700)]
Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction

8 years agoAdd check in fgetcsv in case sizeof(unit) != sizeof(size_t)
Stanislav Malyshev [Mon, 12 Sep 2016 03:58:55 +0000 (20:58 -0700)]
Add check in fgetcsv in case sizeof(unit) != sizeof(size_t)

8 years agoFix bug #73029 - Missing type check when unserializing SplArray
Stanislav Malyshev [Mon, 12 Sep 2016 03:24:13 +0000 (20:24 -0700)]
Fix bug #73029 - Missing type check when unserializing SplArray

8 years agoFix bug #72860: wddx_deserialize use-after-free
Stanislav Malyshev [Tue, 6 Sep 2016 06:42:31 +0000 (23:42 -0700)]
Fix bug #72860: wddx_deserialize use-after-free

8 years agoAlso fix overflow in wordwrap
Stanislav Malyshev [Tue, 6 Sep 2016 01:10:51 +0000 (18:10 -0700)]
Also fix overflow in wordwrap

8 years agoFix bug #73007: add locale length check
Stanislav Malyshev [Tue, 6 Sep 2016 01:01:35 +0000 (18:01 -0700)]
Fix bug #73007: add locale length check

8 years agoAdd more checks for int overflow
Stanislav Malyshev [Mon, 5 Sep 2016 05:18:19 +0000 (22:18 -0700)]
Add more checks for int overflow

8 years agoFix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile
Stanislav Malyshev [Mon, 5 Sep 2016 05:07:35 +0000 (22:07 -0700)]
Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile

8 years agoFix various int size overflows.
Stanislav Malyshev [Fri, 2 Sep 2016 06:15:34 +0000 (23:15 -0700)]
Fix various int size overflows.

Add function for detection of string zvals with length that does not fit
INT_MAX.

8 years agoAdd myself as pdo_dblib maintainer
Adam Baratz [Fri, 9 Sep 2016 21:00:50 +0000 (17:00 -0400)]
Add myself as pdo_dblib maintainer

8 years agoSkip regression test for issue that has not yet been released in libgd
Christoph M. Becker [Mon, 12 Sep 2016 11:21:34 +0000 (13:21 +0200)]
Skip regression test for issue that has not yet been released in libgd

<https://github.com/libgd/libgd/issues/177> has been assessed as enhancement,
so most likely it will be released with GD 2.3.

8 years agoSkip test for external GD because of not yet published bugfix
Christoph M. Becker [Mon, 12 Sep 2016 10:34:11 +0000 (12:34 +0200)]
Skip test for external GD because of not yet published bugfix

8 years agoSkip tests for unpatched external libgd regarding libvpx
Christoph M. Becker [Sun, 11 Sep 2016 21:49:09 +0000 (23:49 +0200)]
Skip tests for unpatched external libgd regarding libvpx

Some issues have never been fixed in the external libgd's libvpx binding,
so we skip the respective tests.

8 years agoSplit test for bundled vs. external libgd
Christoph M. Becker [Sun, 11 Sep 2016 17:30:55 +0000 (19:30 +0200)]
Split test for bundled vs. external libgd

The behavior of imagecropauto($im, IMG_CROP_DEFAULT) is rather different
for the bundled and an external libgd, see
<https://github.com/libgd/libgd/issues/298>.
Therefore we split the test for now.

8 years agoMake test case more resilient
Christoph M. Becker [Sun, 11 Sep 2016 16:29:27 +0000 (18:29 +0200)]
Make test case more resilient

This test case fails with external libgd, because libgd < 2.2.4 converts
palette images to truecolor (<https://github.com/libgd/libgd/issues/297>).

However, even if there happens no truecolor conversion, it is not guaranteed
that the palette indexes of the original and the cropped image are identical
(this is, for instance, not the case with current libgd master where the bug
has been fixed). Therefore we check for the expected RGBA value instead of
the palette index.

8 years agoA picture is worth a thousand message digests
Christoph M. Becker [Sun, 19 Jun 2016 12:29:27 +0000 (14:29 +0200)]
A picture is worth a thousand message digests

The bundled GD test suites makes heavy use of md5() to verify the result
of drawing operations. This leads to fragile tests (even a slight change
in a PNG header would cause failure, and of course there is the
possibility of collisions), and even worse, eventual test failures are
rather unrevealing.

Therefore we replace all md5() verification with a simplistic
test_image_equals_file(), which is basically a simplified port of libgd's
gdTestImageCompareToFile(), adapted to the needs of PHPTs.

In the long run better tests helpers should be introduced (see also
<http://news.php.net/php.internals/94081>), but for now this solution
is preferable over the former.

(cherry picked from commit 24f9e96792518ec2a75f26b1eb2471dd7694f2b7)

8 years agoAdd regression test for bug #73053
Christoph M. Becker [Sat, 10 Sep 2016 22:06:45 +0000 (00:06 +0200)]
Add regression test for bug #73053

The test succeeds with libxml < 2.9.4, and is supposed to succeed with
libxml > 2.9.4. Unfortunately, we can't conditionally mark a test case
as XFAIL, so we're simply skipping the test for libxml 2.9.4 instead.

8 years agoupdate NEWS
Anatol Belski [Sat, 10 Sep 2016 09:02:17 +0000 (11:02 +0200)]
update NEWS

8 years agoBug #73058 crypt broken when salt is 'too' long
Anatol Belski [Sat, 10 Sep 2016 00:39:28 +0000 (02:39 +0200)]
Bug #73058 crypt broken when salt is 'too' long

8 years agoRemove ignored --FAIL-- section from test case
Christoph M. Becker [Fri, 9 Sep 2016 14:27:50 +0000 (16:27 +0200)]
Remove ignored --FAIL-- section from test case

This is just confusing.

8 years agoFix #73054: default option ignored when object passed to int filter
Christoph M. Becker [Fri, 9 Sep 2016 12:30:24 +0000 (14:30 +0200)]
Fix #73054: default option ignored when object passed to int filter

If an object that can't be converted to string is validated, we must not
bail out early, but rather check for a requested default value.

8 years agoPartially fix bug #67167 - Wrong return value...
Levi Morrison [Thu, 3 Sep 2015 00:23:26 +0000 (18:23 -0600)]
Partially fix bug #67167 - Wrong return value...

...from FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE

The remainer of the fix would require the filter functions to only
convert to string when it makes sense for that particular filter.

(cherry picked from commit 432dc527adcbc3bf4809f6315350300d42c16c52)

8 years agoFixed Bug #68015 Session does not report invalid uid for files save handler
Yasuo Ohgaki [Fri, 9 Sep 2016 02:30:33 +0000 (11:30 +0900)]
Fixed Bug #68015 Session does not report invalid uid for files save handler

8 years agobackport 59444347 and 3d7343f6
Anatol Belski [Thu, 8 Sep 2016 15:46:53 +0000 (17:46 +0200)]
backport 59444347 and 3d7343f6

8 years agoFix bug26639.phpt
Yasuo Ohgaki [Thu, 8 Sep 2016 05:07:57 +0000 (14:07 +0900)]
Fix bug26639.phpt

8 years agoUpdate NEWS
Yasuo Ohgaki [Thu, 8 Sep 2016 04:35:30 +0000 (13:35 +0900)]
Update NEWS

8 years agoFix Bug #72992 mbstring.internal_encoding doesn't inherit default_charset
Yasuo Ohgaki [Thu, 8 Sep 2016 04:16:50 +0000 (13:16 +0900)]
Fix Bug #72992 mbstring.internal_encoding doesn't inherit default_charset

8 years agoFix potential memory issue with USE_ZEND_ALLOC=0
Christoph M. Becker [Wed, 7 Sep 2016 20:50:53 +0000 (22:50 +0200)]
Fix potential memory issue with USE_ZEND_ALLOC=0

The PHP core and extensions are written with the assumption that memory
allocation either succeeds, or the allocator bails out (i.e. the allocator
is infallible). Therefore the result of emalloc() and friends are not checked
for NULL values.

However, with USE_ZEND_ALLOC=0, malloc() and friends are used as allocators,
but these are fallible, i.e. they return NULL instead of bailing out if they
fail. This easily leads to invalid memory accesses in the following, such as
in <https://bugs.php.net/73032>. Some of these cases may constitute
exploitable vulnerabilities.

Therefore we make the infallible __zend_alloc() and friends the default for
USE_ZEND_ALLOC=0.

8 years agoFix #73025: Heap Buffer Overflow in virtual_popen of zend_virtual_cwd.c
Christoph M. Becker [Tue, 6 Sep 2016 10:05:22 +0000 (12:05 +0200)]
Fix #73025: Heap Buffer Overflow in virtual_popen of zend_virtual_cwd.c

`command_length` is retrieved via strlen() and later passed to emalloc()
and memcpy(), so the appropriate type is `size_t`.

We don't add a regression test, because that would need to allocate a string
of at least 2 GiB.

8 years agoUpdate NEWS
Yasuo Ohgaki [Tue, 6 Sep 2016 09:29:20 +0000 (18:29 +0900)]
Update NEWS

8 years agoFixed Bug #66964 mb_convert_variables() cannot detect recursion
Yasuo Ohgaki [Tue, 6 Sep 2016 07:05:34 +0000 (16:05 +0900)]
Fixed Bug #66964 mb_convert_variables() cannot detect recursion

8 years agoFix #70752: Depacking with wrong password leaves 0 length files
Christoph M. Becker [Mon, 5 Sep 2016 22:28:28 +0000 (00:28 +0200)]
Fix #70752: Depacking with wrong password leaves 0 length files

We should not open the output stream before we have tried to open the
archive entry, as failing the latter could leave an empty file behind.

8 years agoUpdated NEWS
Julien Pauli [Mon, 5 Sep 2016 15:03:29 +0000 (17:03 +0200)]
Updated NEWS

8 years agoFixes #72590: Opcache restart with kill_all_lockers does not work
Keyur [Wed, 13 Jul 2016 02:47:46 +0000 (02:47 +0000)]
Fixes #72590: Opcache restart with kill_all_lockers does not work

ACCEL_LOG_ERROR is special and causes a zend_bailout() and the code
never gets to call kill() in the next line after the logging. Change
the log level to WARNING.

8 years agoLimit editorconfig to C code
Nikita Popov [Mon, 5 Sep 2016 12:21:43 +0000 (14:21 +0200)]
Limit editorconfig to C code

PHPT files do not follow this.

[ci skip]

8 years agoUpdated NEWS
Julien Pauli [Mon, 5 Sep 2016 08:17:56 +0000 (10:17 +0200)]
Updated NEWS

8 years agoFix #72972, Bad filter for the flags FILTER_FLAG_NO_RES_RANGE and FILTER_FLAG_NO_PRIV...
Julien Pauli [Thu, 1 Sep 2016 08:36:58 +0000 (10:36 +0200)]
Fix #72972, Bad filter for the flags FILTER_FLAG_NO_RES_RANGE and FILTER_FLAG_NO_PRIV_RANGE

8 years agoAdded editorconfig file
Richard Fussenegger [Sun, 26 Jun 2016 15:51:44 +0000 (17:51 +0200)]
Added editorconfig file

8 years agoImplement #47456: Missing PCRE option 'J'
Christoph M. Becker [Thu, 21 Jul 2016 13:36:42 +0000 (15:36 +0200)]
Implement #47456: Missing PCRE option 'J'

While it is possible to force the same behavior by setting the internal
option (?J), having a dedicated modifier appears to be useful. After all,
J is even listed on the "Pattern Modifiers" man page[1], but the description
referrs to (?J).

[1] <http://php.net/manual/en/reference.pcre.pattern.modifiers.php>

8 years agoMerge branch 'pull-request/2061' into PHP-5.6
Stanislav Malyshev [Mon, 5 Sep 2016 07:29:11 +0000 (00:29 -0700)]
Merge branch 'pull-request/2061' into PHP-5.6

* pull-request/2061:
  Recognize TDS versions 7.3 and 7.4

8 years agoUse integer placeholders, since values can vary with the TDS version
Adam Baratz [Wed, 24 Aug 2016 22:44:55 +0000 (18:44 -0400)]
Use integer placeholders, since values can vary with the TDS version

8 years agoSame issue as #72926 in another place.
Stanislav Malyshev [Mon, 5 Sep 2016 03:49:34 +0000 (20:49 -0700)]
Same issue as #72926 in another place.

8 years agoSync fix for bug #72910 with current upstream
Stanislav Malyshev [Mon, 5 Sep 2016 02:13:22 +0000 (19:13 -0700)]
Sync fix for bug #72910 with current upstream

8 years agoFix #72994: mbc_to_code() out of bounds read
Christoph M. Becker [Sun, 4 Sep 2016 14:37:06 +0000 (16:37 +0200)]
Fix #72994: mbc_to_code() out of bounds read

We're backporting commit 999a3553 to the still supported PHP 5.6.

8 years agoFix #67325: imagetruecolortopalette: white is duplicated in palette
Christoph M. Becker [Sat, 3 Sep 2016 17:46:38 +0000 (19:46 +0200)]
Fix #67325: imagetruecolortopalette: white is duplicated in palette

gdImageTrueColorToPalette() is sometimes wasteful by putting multiple white
color entries into the palette. This is caused by an obvious typo, where
to avoid a division by zero when `total` is zero, `count` is checked instead
of `total`.

We fix this issue to improve the quality of the color quantization.

Cf. <https://github.com/libgd/libgd/commit/24b4550f>

8 years agofix leak and error check order
Anatol Belski [Sat, 3 Sep 2016 14:59:17 +0000 (16:59 +0200)]
fix leak and error check order

8 years agoFix proto comment
Christoph M. Becker [Sat, 3 Sep 2016 11:31:13 +0000 (13:31 +0200)]
Fix proto comment

While we're at it, we also change a related comment to use American English
consistently.

8 years agoMake test case more resilient
Christoph M. Becker [Fri, 2 Sep 2016 22:18:19 +0000 (00:18 +0200)]
Make test case more resilient

When ran from a root directory the test case failed, because the open_basedir
restriction for "../[…]" won't kick in. Therefore we change the current
working directory to the test case's directory, as discussed on internals,
see <http://news.php.net/php.internals/95585>.

8 years agofix double free
Anatol Belski [Fri, 2 Sep 2016 22:01:04 +0000 (00:01 +0200)]
fix double free

8 years agoFix bug #72910
Stanislav Malyshev [Fri, 2 Sep 2016 06:27:06 +0000 (23:27 -0700)]
Fix bug #72910

Merge upstream patch from https://github.com/kkos/oniguruma/commit/65bdf2a0d160d06556415e5f396a75f6b11bad5c

8 years ago5.6.27 will be next
Ferenc Kovacs [Thu, 1 Sep 2016 18:27:19 +0000 (20:27 +0200)]
5.6.27 will be next

8 years agoFix #71882 amendment 2: Negative ftruncate() on php://memory exhausts memory
Christoph M. Becker [Wed, 31 Aug 2016 14:33:14 +0000 (16:33 +0200)]
Fix #71882 amendment 2: Negative ftruncate() on php://memory exhausts memory