Commit Graph

83458 Commits

Author SHA1 Message Date
Adam Baratz
84d495055d Use integer placeholders, since values can vary with the TDS version 2016-09-05 00:17:59 -07:00
Stanislav Malyshev
b578580e88 Same issue as #72926 in another place. 2016-09-04 20:49:34 -07:00
Stanislav Malyshev
d1fbc98ff6 Sync fix for bug #72910 with current upstream 2016-09-04 19:13:48 -07:00
Christoph M. Becker
b7259b71b4 Fix #72994: mbc_to_code() out of bounds read
We're backporting commit 999a3553 to the still supported PHP 5.6.
2016-09-04 16:37:06 +02:00
Christoph M. Becker
d582241368 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>
2016-09-03 19:50:42 +02:00
Anatol Belski
9513187dee fix leak and error check order 2016-09-03 16:59:17 +02:00
Christoph M. Becker
bca913d70a Fix proto comment
While we're at it, we also change a related comment to use American English
consistently.
2016-09-03 13:41:29 +02:00
Christoph M. Becker
c83bdb8e6a 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>.
2016-09-03 00:24:30 +02:00
Anatol Belski
5efd2a33df fix double free 2016-09-03 00:01:04 +02:00
Stanislav Malyshev
e576714f6b Fix bug #72910
Merge upstream patch from 65bdf2a0d1
2016-09-01 23:27:06 -07:00
Ferenc Kovacs
fbb81dd755 5.6.27 will be next 2016-09-01 20:27:19 +02:00
Christoph M. Becker
b2d267d9ee Fix #71882 amendment 2: Negative ftruncate() on php://memory exhausts memory 2016-08-31 16:33:14 +02:00
Christoph M. Becker
314a9f8553 Fix #71882 amendment: Negative ftruncate() on php://memory exhausts memory
To avoid BC breaks, we do not raise a warning for now.
2016-08-31 14:51:37 +02:00
Yasuo Ohgaki
747b61808b Update NEWS 2016-08-31 21:06:19 +09:00
Christoph M. Becker
2f10db36af Fix #66797: mb_substr only takes 32-bit signed integer
`from` and `len` are `long`, but get passed to mbfl_substr() which expects
`int`s. Therefore we clamp the values to avoid the undefined conversion
behavior.
2016-08-30 14:52:47 +02:00
Ville Hukkamäki
af7828a20f Test case for bug #72771 2016-08-30 13:44:34 +02:00
Christoph M. Becker
207dab585a Fix #71882: Negative ftruncate() on php://memory exhausts memory
We must not pass negative sizes to a size_t parameter.
2016-08-30 02:05:45 +02:00
Anatol Belski
c7b4cd1a51 fix HANDLE leak 2016-08-29 21:45:39 +02:00
Anatol Belski
ae81e8fc32 update NEWS 2016-08-29 21:20:36 +02:00
Anatol Belski
d787b0ea13 ensure null termination 2016-08-29 21:03:03 +02:00
Anatol Belski
295303b590 Fixed bug #72703 Out of bounds global memory read in BF_crypt triggered by password_verify 2016-08-29 20:25:34 +02:00
Anatol Belski
1a840b9af0 fix double free 2016-08-29 19:27:47 +02:00
Anatol Belski
e2609a38d9 fix leak 2016-08-29 18:01:21 +02:00
George Wang
c73bcbefbd Added .user.ini support.
Added LSPHPRC support.
update LiteSpeed SAPI version to 6.10 .
2016-08-28 21:49:30 -04:00
Christoph M. Becker
2139918ea6 Fix #65550: get_browser() incorrectly parsers entries with "+" sign
+ signs in the browscap patterns are meant to be literal characters, so we
have to escape them for the regex matching.
2016-08-27 01:12:01 +02:00
Christoph M. Becker
84512a1177 Fix #70825: Cannot fetch multiple values with group in ini file
If we have the position already from the last fetch, we also have to preset
the current group, because it won't be read again.
2016-08-25 18:18:10 +02:00
Christoph M. Becker
bd8112afe0 Fix #71514: Bad dba_replace condition because of wrong API usage
We're backporting commit 9e309a2d to PHP-5.6, because it is a bugfix.
2016-08-25 16:20:30 +02:00
Anatol Belski
a1ff39ffe5 backport relevant part from bug #72858 patch in 7.0 2016-08-25 12:46:28 +02:00
Christoph M. Becker
6a232c3604 Fix #68716: possible resource leaks in _php_image_convert()
We properly clean up after ourselves wrt. to closing opened file pointers
and created images.
2016-08-21 19:39:58 +02:00
Christoph M. Becker
d65adac2be Fix #72913: imagecopy() loses single-color transparency on palette images
The proper code to handle true-color to palette copies is already contained
in gdImageCopy(), so we can simply remove the buggy duplicated code.
2016-08-21 17:39:23 +02:00
Christoph M. Becker
9eb5bbd8bd Fix #66005: imagecopy does not support 1bit transparency on truecolor images
We must not copy transparent pixels, see
<https://github.com/libgd/libgd/commit/daac285c>.
2016-08-21 16:08:57 +02:00
Xinchen Hui
226e21b0fe Merge branch 'PHP-5.6' of git.php.net:/php-src into PHP-5.6
* 'PHP-5.6' of git.php.net:/php-src:
  Improvements to fix #72714, suggested by nikic
  Fix #65732: grapheme_*() is not Unicode compliant on CR LF sequence
  Fix #72714: _xml_startElementHandler() segmentation fault
  update NEWS
  Fixed bug #72852 imap_mail null dereference
  Revert "Fix dba configuration for Windows"
  Fix dba configuration for Windows
  Fix broken test include
  fix NEWS
  Add myself as PDO_OCI maintainer
2016-08-21 17:19:24 +08:00
Xinchen Hui
b740bb3987 Fixed bug #72907 (null pointer deref, segfault in gc_remove_zval_from_buffer (zend_gc.c:260)) 2016-08-21 17:10:10 +08:00
Christoph M. Becker
52793c14d9 Improvements to fix #72714, suggested by nikic 2016-08-20 12:44:20 +02:00
Christoph M. Becker
e4a006cd3e Fix #65732: grapheme_*() is not Unicode compliant on CR LF sequence
According to the Unicode specification (at least as of 5.1), CRLF sequences
are considered to be a single grapheme. We cater to that special case by
letting grapheme_ascii_check() fail. While it would be trivial to fix
grapheme_ascii_check() wrt. grapheme_strlen(), grapheme_substr() and
grapheme_strrpos() would be much harder to handle, so we accept the slight
performance penalty if CRLF is involved.
2016-08-20 03:01:35 +02:00
Christoph M. Becker
9164dc11e2 Fix #72714: _xml_startElementHandler() segmentation fault
The issue is caused by an integer overflow when the `long` passed as
XML_OPTION_SKIP_TAGSTART is assigned to `xml_parser::toffset` which is
declared as `int`. We can simply work around this issue, by clipping
resulting negative values to 0 (and raising a notice in this case), because
the reasonable range for this value is certainly catered to by positive
`int`s.

However, there still remains the issue that `xml_parser::toffset` is later
added to `char *`s, which can cause OOB reads, so we make sure that the
upper bound never exceeds the strlen(). We eschew optimizing `SKIP_TAGSTART`
wrt. to the potentially duplicate strlen() call, because that code path is
unexpected anyway.
2016-08-20 01:58:08 +02:00
Anatol Belski
f682193609 update NEWS 2016-08-20 01:36:37 +02:00
Anatol Belski
21f08a7488 Fixed bug #72852 imap_mail null dereference 2016-08-20 01:34:46 +02:00
Christoph M. Becker
057278b759 Revert "Fix dba configuration for Windows"
This reverts commit ad76e8a529.

After a discussion with Anatol it seems to be better QA wise to not make
this change in stable versions or betas.
2016-08-19 16:35:31 +02:00
Christoph M. Becker
ad76e8a529 Fix dba configuration for Windows
To be able to build the dba extension on Windows, libdb was required. This
is contrary to *nix where each handler can be configured individually. To
avoid BC breaks, we only do minimal modifications, instead of adjusting the
Windows configuration to match the *nix configuration, for now.
2016-08-19 11:42:16 +02:00
Christoph M. Becker
bc1214f25e Fix broken test include
To avoid that the test stalls, we must always use `t` mode.
2016-08-18 17:53:57 +02:00
Ferenc Kovacs
761d2f629b fix NEWS 2016-08-18 13:01:53 +02:00
Christopher Jones
f2d5305097 Add myself as PDO_OCI maintainer 2016-08-18 15:47:25 +10:00
Christopher Jones
b12ac316eb Prepare for OCI8 PECL release 2016-08-18 13:50:36 +10:00
Christoph M. Becker
54293d21cb Skip tests that are supposed to fail due to bugs in old external libgd 2016-08-17 21:36:26 +02:00
Christoph M. Becker
a3159d29bb Make tests a little more resilient
PNG allows identical images to be stored differently what makes nearly all
tests checking the MD5 hash of the PNG representation fail with external
libgd. For now, we use the GD format instead, which doesn't allow for such
differences.

Of course, this md5() checking should be replaced by a image diffing feature
in the long run.
2016-08-17 17:59:33 +02:00
Christoph M. Becker
48198e4c25 Fix #68302: impossible to compile php with zip support
We should not let configure succeed, if SIZEOF_OFF_T == 0, just to let the
compilation fail later. Instead we bail out early, giving a hint regarding
the potential issue, namely misconfigured libraries.
2016-08-17 12:43:29 +02: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
9e00ad2b09 Update NEWS 2016-08-16 23:44:59 -07:00
Stanislav Malyshev
4bf5c3187f BLock test with memory leak 2016-08-16 22:55:44 -07:00