Commit Graph

35898 Commits

Author SHA1 Message Date
Pierre Joye
b61bd1243a Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix #72519, possible OOB using imagegif
2016-07-19 14:16:01 +07:00
Stanislav Malyshev
33c1a55b40 Apparently some envs miss SIZE_MAX 2016-07-19 00:13:25 -07:00
Pierre Joye
2fbce5f51f fix #72519, possible OOB using imagegif 2016-07-19 14:11:44 +07:00
Pierre Joye
511f07b747 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix #72512, invalid read or write for palette image when invalid transparent index is used
2016-07-19 13:39:46 +07:00
Pierre Joye
0fbcff1b35 fix #72512, invalid read or write for palette image when invalid transparent index is used 2016-07-19 13:37:23 +07:00
Stanislav Malyshev
08ac37bd2a Merge branch 'PHP-5.5.38' into PHP-5.5
* PHP-5.5.38:
  Fix tests
  Fix bug #72618: NULL Pointer Dereference in exif_process_user_comment
  Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t
  Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c
  Fix for bug #72558, Integer overflow error within _gdContributionsAlloc()
  Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE
  Fix bug #72562 - destroy var_hash properly
  Fix bug #72533 (locale_accept_from_http out-of-bounds access)
  Fix fir bug #72520
  Fix for bug #72513
  CS fix and comments with bug ID
  Fix for HTTP_PROXY issue.
  add tests for bug #72512
  Fixed bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access
  Fixed bug #72479 - same as #72434
2016-07-18 23:32:38 -07:00
Stanislav Malyshev
1364742be9 Fix tests 2016-07-18 23:30:51 -07:00
Stanislav Malyshev
41131cd41d Fix bug #72618: NULL Pointer Dereference in exif_process_user_comment 2016-07-18 23:21:51 -07:00
Stanislav Malyshev
f3feddb5b4 Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t 2016-07-18 22:24:52 -07:00
Stanislav Malyshev
e6c48213c2 Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c 2016-07-18 21:44:39 -07:00
Christoph M. Becker
3c3980caa1 Merge branch 'pull-request/1991' into PHP-5.6 2016-07-19 00:42:49 +02:00
Christoph M. Becker
6cb75fb1e8 Fix #70315: 500 Server Error but page is fully rendered
That happens because the external libgd uses other error codes than PHP
(and the bundled libgd), but the libgd error codes are simply forwarded
to php_verror(). We fix that by properly mapping libgd errors to PHP errors.
2016-07-19 00:18:07 +02:00
Stanislav Malyshev
d1a491acf3 Fix for bug #72558, Integer overflow error within _gdContributionsAlloc() 2016-07-18 00:17:48 -07:00
Stanislav Malyshev
eebcbd5de3 Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE 2016-07-17 16:34:21 -07:00
Christoph M. Becker
3666cfab97 Fix #72604: imagearc() ignores thickness for full arcs
We remove the special casing for full arcs, what conforms to external libgd.
2016-07-15 19:45:52 +02:00
Christoph M. Becker
a4aa4f9772 Fix bug #66502: DOM document dangling reference
When we decrement the refcount of a node's document, we state that we
won't need it anymore. Therefore we can *always* set the pointer to the
document to NULL, what avoids invalid memory accesses for some edge cases
as demonstrated with the PHPT.

Original patch provided by Sean Heelan.
2016-07-15 01:08:08 +02:00
Anatol Belski
d0c98366d0 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Extend libxml exports
  Updated NEWS
  Fix #69975: PHP segfaults when accessing nvarchar(max) defined columns
  Updated NEWS
  Fix bug #70480 (php_url_parse_ex() buffer overflow read)
  Update PHP 5.5 NEWS entries with CVE info
2016-07-14 21:13:49 +02:00
Anatol Belski
fe1d6feb3d Extend libxml exports
These are needed to support libxslt 1.1.29 on Windows. This libxslt version
fixes CVE-2015-7995 and for this reason needs to be used.
2016-07-14 21:08:54 +02:00
Christoph M. Becker
8bb3bd04a9 Fix bug #72596: imagetypes function won't advertise WEBP support
We add the constant IMG_WEBP and make sure that WebP support is properly
reported by imagetypes().
2016-07-14 17:17:59 +02:00
nikita2206
eb190b4e91 fix: bug72222 for PHP-5.6 reflection export of array consts 2016-07-13 21:39:55 +02:00
Stanislav Malyshev
3798eb6fd5 Fix bug #72562 - destroy var_hash properly 2016-07-12 23:27:45 -07:00
Stanislav Malyshev
aa82e99ed8 Fix bug #72533 (locale_accept_from_http out-of-bounds access) 2016-07-12 22:37:36 -07:00
Stanislav Malyshev
81406c0c1d Fix fir bug #72520 2016-07-12 22:05:00 -07:00
Julien Pauli
822498128b Revert "Fixes #52384: Adds parameter value to dumped output. Also adds output flag indicating presence of PDO::PARAM_INPUT_OUTPUT."
This reverts commit 15336b44d9.
2016-07-12 15:46:07 +02:00
Julien Pauli
5cce0d7c7c Revert "Fix test for #52384"
This reverts commit 642e44b98f.
2016-07-12 15:45:49 +02:00
Julien Pauli
642e44b98f Fix test for #52384 2016-07-12 15:27:37 +02:00
Christoph M. Becker
76e249d31c Partially fix #72506: idn_to_ascii for UTS #46 incorrect for long domain names
We don't actually fix this issue wrt. the empty $info array, because it is
not clear what this array should contain and we're concerned about the
potential BC break, but at least we fix the inconsistent handling of
resulting domains with 255 bytes (which raise an error), and longer domains
(which just return FALSE), what has to be considered a very minor BC break
if at all.
2016-07-12 14:47:14 +02:00
Bishop Bettini
15336b44d9 Fixes #52384: Adds parameter value to dumped output. Also adds output flag indicating presence of PDO::PARAM_INPUT_OUTPUT. 2016-07-12 10:47:07 +02:00
Loz Calver
f5ccd71d0c Fix 72122 - don't use EH_THROW for calls to getIterator 2016-07-12 10:10:35 +02:00
Xinchen Hui
7903276f4c backport to 5.6 (we should not unset the default value) 2016-07-12 12:14:45 +08:00
Christoph M. Becker
966311e627 Bug #66836 has been fixed 2016-07-11 16:06:35 +02:00
Derick Rethans
6a5e1783b7 Generate new .c file from .re file, as that was missing on my previous commit 2016-07-11 11:31:43 +01:00
Stanislav Malyshev
98b9dfaec9 Fix for HTTP_PROXY issue.
The following changes are made:
- _SERVER/_ENV only has HTTP_PROXY if the local environment has it,
  and only one from the environment.
- getenv('HTTP_PROXY') only returns one from the local environment
- getenv has optional second parameter, telling it to only consider
  local environment
2016-07-10 16:21:11 -07:00
Matteo Beccati
219ebcb689 Fixed bug #70313 PDO statement fails to throw exception 2016-07-10 14:33:56 +02:00
Jos Elstgeest
6fc7817558 update filter_var filters for ipv4 addresses to reflect rfc6890 2016-07-08 16:30:06 +02:00
Christoph M. Becker
82637e8187 Fix #69975: PHP segfaults when accessing nvarchar(max) defined columns
The SQL Server Native Client 11.0 and maybe other ODBC drivers report
NVARCHAR(MAX) columns as SQL_WVARCHAR with size 0. This causes too small a
buffer to be emalloc'd, likely causing a segfault in the following. As we don't
know the real size of the column data, we treat such colums as
SQL_WLONGVARCHAR.

The related bug #67437 suggests that some drivers report a size of ~4GB. It is
not certain that this is really the case (there might be some integer overflow
involved, and anyway, there has been no feedback), so we do not cater for this
now. However, it would not be hard to treat all sizes above a certain threshold
in a similar way, i.e. as SQL_WLONGVARCHAR.

(cherry picked from commit 16db4d1462)
(cherry picked from commit 344ff5dd4c)
2016-07-08 15:33:46 +02:00
Julien Pauli
78d5783b62 Backported bug #71144 (Segmentation fault when using cURL with ZTS) 2016-07-08 14:58:56 +02:00
Michael Maroszek
0be13d2dc2 fix bug #72024 (microtime() leaks memory) 2016-07-08 14:36:44 +02:00
Remi Collet
bfc42211d3 add test for bug #72564 (7.x regression) 2016-07-08 10:45:13 +02:00
Christopher Jones
8b905e337c Mask DB usernames from expected test output for test portability 2016-07-07 11:52:17 +10:00
Derick Rethans
884db2f7be Updated to version 2016.6 (2016f) 2016-07-06 11:15:42 +01:00
Anatol Belski
b63d41e1e5 add tests for bug #72512 2016-07-06 10:40:52 +02:00
Valentin VALCIU
4c24f170ea Fix bug #55701: GlobIterator throws LogicException
GlobIterator throws LogicException with message 'The parent constructor was
not called' on its first operation when the glob expression doesn't match
any file. It also throws on the first operation after the iteration
completes, when the glob expression matches some files.

# Resolved conflicts:
#	ext/spl/spl_directory.c
2016-07-05 16:39:25 +02:00
Stanislav Malyshev
e1ba58f068 Fix bug #70480 (php_url_parse_ex() buffer overflow read)
(cherry picked from commit 629e4da7cc)
2016-07-05 10:59:02 +02:00
Pierre Joye
7b2c22696a Fixed bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access 2016-07-04 10:35:20 +02:00
Christoph M. Becker
717a043a32 Fix typo in comment 2016-07-04 03:17:17 +02:00
Stanislav Malyshev
b8487b6a7d Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix the fix for #72403 on nl2br
  5.5.38 now

Conflicts:
	configure.in
	main/php_version.h
2016-06-27 12:32:11 -07:00
Stanislav Malyshev
25bd11cf27 Fix the fix for #72403 on nl2br 2016-06-27 12:30:42 -07:00
Christoph M. Becker
57940605da Fix #70628: Clearing bindings on an SQLite3 statement doesn't work
Obiously, it isn't sufficient to call sqlite3_clear_bindings() alone, but
also the bound_params of the php_sqlite3_stmt have to be cleared.
2016-06-27 17:06:27 +02:00
Stanislav Malyshev
cab1c3b370 Fixed bug #72479 - same as #72434 2016-06-26 18:02:58 -07:00
Anatol Belski
4638ba9c07 fix test cleanup 2016-06-22 12:20:02 +02:00
Anatol Belski
de1c407348 fix dir separator in test 2016-06-22 11:41:05 +02:00
Anatol Belski
e3bd360ec9 fix test
There is a difference between TS and NTS warning message, since
virtual_mkdir vs glibc directly is used. This has no effect for
the actual fix functionality.
2016-06-21 16:20:03 +02:00
Anatol Belski
a00350486f re-fix leak 2016-06-21 15:18:10 +02:00
Anatol Belski
e6cc30e167 Revert "fix leak"
This reverts commit c5d9c50897.
2016-06-21 14:51:43 +02:00
Anatol Belski
c5d9c50897 fix leak 2016-06-21 12:29:41 +02:00
Anatol Belski
fd93c8601d remove the huge test file, generate it on the fly instead 2016-06-21 09:45:26 +02:00
Anatol Belski
0c7250f260 remove the huge test file, generate it on the fly instead 2016-06-21 09:42:38 +02:00
Stanislav Malyshev
c9b24ef307 Merge branch 'PHP-5.6.23' into PHP-5.6
* PHP-5.6.23:
  Fixed bug #72446 - Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow
  update NEWS
  fix tests
  fix build
  Fix bug #72455:  Heap Overflow due to integer overflows
  Fix bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize
  Fixed ##72433: Use After Free Vulnerability in PHP's GC algorithm and unserialize
  Fix bug #72407: NULL Pointer Dereference at _gdScaleVert
  Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free
  Fix bug #72298	pass2_no_dither out-of-bounds access
  Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap overflow
  Fix bug #72262 - do not overflow int
  Fix bug #72400 and #72403 - prevent signed int overflows for string lengths
  Fix bug #72275: don't allow smart_str to overflow int
  Fix bug #72340: Double Free Courruption in wddx_deserialize
  Fix bug #72321 - use efree() for emalloc allocation
  5.6.23RC1

Conflicts:
	configure.in
	main/php_version.h
2016-06-21 00:02:37 -07:00
Stanislav Malyshev
7dde353ee7 Merge branch 'PHP-5.5' into PHP-5.6.23
* PHP-5.5:
  Fixed bug #72446 - Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow
  update NEWS
  fix tests
  fix build
  Fix bug #72455:  Heap Overflow due to integer overflows
  Fix bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize
  Fixed ##72433: Use After Free Vulnerability in PHP's GC algorithm and unserialize
  Fix bug #72407: NULL Pointer Dereference at _gdScaleVert
  Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free
  Fix bug #72298	pass2_no_dither out-of-bounds access
  Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap overflow
  Fix bug #72262 - do not overflow int
  Fix bug #72400 and #72403 - prevent signed int overflows for string lengths
  Fix bug #72275: don't allow smart_str to overflow int
  Fix bug #72340: Double Free Courruption in wddx_deserialize
  update NEWS
  Fix #66387: Stack overflow with imagefilltoborder
  Skip test which is 64bits only
  5.5.37 now

Conflicts:
	configure.in
	ext/mcrypt/mcrypt.c
	ext/spl/spl_directory.c
	main/php_version.h
2016-06-21 00:01:48 -07:00
Stanislav Malyshev
c395c6e5d7 iFixed bug #72446 - Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow 2016-06-20 23:58:26 -07:00
Stanislav Malyshev
e1d2f86a41 Merge branch 'PHP-5.5.37' into PHP-5.5
* PHP-5.5.37:
  fix tests
  fix build
  Fix bug #72455:  Heap Overflow due to integer overflows
  Fix bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize
  Fixed ##72433: Use After Free Vulnerability in PHP's GC algorithm and unserialize
  Fix bug #72407: NULL Pointer Dereference at _gdScaleVert
  Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free
  Fix bug #72298	pass2_no_dither out-of-bounds access
  Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap overflow
  Fix bug #72262 - do not overflow int
  Fix bug #72400 and #72403 - prevent signed int overflows for string lengths
  Fix bug #72275: don't allow smart_str to overflow int
  Fix bug #72340: Double Free Courruption in wddx_deserialize
2016-06-20 23:31:54 -07:00
Stanislav Malyshev
5f107ab8a6 fix tests 2016-06-20 22:54:55 -07:00
Stanislav Malyshev
7f428cae88 fix build 2016-06-20 22:13:31 -07:00
Stanislav Malyshev
6c5211a0ce Fix bug #72455: Heap Overflow due to integer overflows 2016-06-20 21:51:42 -07:00
Stanislav Malyshev
f6aef68089 Fix bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize 2016-06-20 21:35:22 -07:00
Stanislav Malyshev
3f627e580a Fixed ##72433: Use After Free Vulnerability in PHP's GC algorithm and unserialize 2016-06-20 21:26:33 -07:00
Christoph M. Becker
4b4275059f Fix #64641: imagefilledpolygon doesn't draw horizontal line
As has been reported, 1-dimensional horizontal filled polygons are not drawn
at all. That is caused by the scanline algorithm used for drawing filled
polygons which skips the drawing of horizontal edges, because that is
normally not necessary. If, however, the polygon consists of horizontal
edges only, that obviously doesn't work, so we add a special case handling.

That has also been fixed in libgd with
<https://github.com/libgd/libgd/commit/f9f10fa9>.
2016-06-20 15:17:52 +02:00
Stanislav Malyshev
42b2d7fec5 Fix bug #72447: Type Confusion in php_bz2_filter_create() 2016-06-18 22:10:22 -07:00
Stanislav Malyshev
b9ec171e7d Fix bug #72407: NULL Pointer Dereference at _gdScaleVert 2016-06-18 21:57:25 -07:00
Stanislav Malyshev
5b597a2e5b Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free 2016-06-18 21:48:39 -07:00
Stanislav Malyshev
e9ac8954be Fix bug #72298 pass2_no_dither out-of-bounds access 2016-06-18 21:06:09 -07:00
Pierre Joye
7722455726 Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap overflow 2016-06-18 20:15:10 +02:00
Christoph M. Becker
ed0ec66996 Fix #53640: XBM images require width to be multiple of 8 2016-06-17 17:50:36 +02:00
Jakub Zelenka
0c34f53c93 Fix incorrect error suppressing in openssl_error_string test 2016-06-16 20:11:02 +01:00
Jakub Zelenka
84948e6382 Fix occasionally failing OpenSSL DH bug test
The test was failing when first byte was 0
2016-06-16 20:09:17 +01:00
Christoph M. Becker
8aa511f1fc Fix #43475: Styled thick horizontal lines are scrambled
Thick lines are drawn by gdImageFilledRectangle(), which iterates over
the x ordinate first (Z order) to apply the style pattern. While this works
fine for vertical and diagonal lines, it obviously fails for horizontal
lines, which have to be iterated over in N order.

To fix this bug, we introduce the helpers  gdImageFilled(H|V)Rectangle(),
which may be reused for other purposes as well.

This is basically the same fix as libgd/libgd/c2b91dbc.
2016-06-16 13:59:00 +02:00
Stanislav Malyshev
7245bff300 Fix bug #72262 - do not overflow int 2016-06-15 21:58:26 -07:00
Stanislav Malyshev
88746d60ab Fix bug #72400 and #72403 - prevent signed int overflows for string lengths 2016-06-15 21:51:28 -07:00
Derick Rethans
8267a5fba7 Fixed expected test outcome due to rule changes 2016-06-15 18:31:41 +01:00
Derick Rethans
fffa1aa0f3 Updated to version 2016.5 (2016e) 2016-06-15 11:58:47 +01:00
Nikita Popov
248fdfcf73 Maybe fix bug #72011 2016-06-14 22:37:27 +02:00
Bartosz Dziewoński
1ab5a1b432 Fix #50845: exif_process_IFD_TAG: Use the right offset if reading from stream
When the location of the data is outside of the range we have
preloaded (for example, if it's before the beginning of the IFD
structure), we have to read it from the stream into a separate buffer.
The offset calculations in this case were incorrect, resulting in
bogus values being read for the affected fields (sometimes parts of
other fields, sometimes binary data).

The included test image, sourced from [1], is in the public domain.

[1] https://commons.wikimedia.org/wiki/File:U.S._Marines_Prepare_to_board_an_MV-22_Osprey_160509-M-AF202-041.jpg
2016-06-14 10:48:08 -07:00
Stanislav Malyshev
4c968c6ddd Fix bug #72138 - Integer Overflow in Length of String-typed ZVAL 2016-06-14 01:03:03 -07:00
Stanislav Malyshev
489fd56fe3 Fix bug #72275: don't allow smart_str to overflow int 2016-06-14 00:02:17 -07:00
Stanislav Malyshev
a44c89e8af Fix bug #72340: Double Free Courruption in wddx_deserialize 2016-06-12 23:18:23 -07:00
Christoph M. Becker
f96ebb0986 Fix #66387: Stack overflow with imagefilltoborder
The stack overflow is caused by the recursive algorithm in combination with a
very large negative coordinate passed to gdImageFillToBorder(). As there is
already a clipping for large positive coordinates to the width and height of
the image, it seems to be consequent to clip to zero also.
2016-06-13 08:10:36 +02:00
Stanislav Malyshev
d144590d38 Fix bug #72321 - use efree() for emalloc allocation 2016-06-12 21:35:13 -07:00
Jakub Zelenka
0e2447cd11 Fix bug #71915 (openssl_random_pseudo_bytes is not fork-safe)
Add time to the entropy before using RAND_bytes
2016-06-12 18:14:21 +01:00
Jakub Zelenka
54310d95f9 Fix bug #72336 (openssl_pkey_new does not fail for invalid DSA params) 2016-06-12 18:14:21 +01:00
Jakub Zelenka
4056edd20d Update openssl_error_string to run and be more forgiving 2016-06-12 18:14:21 +01:00
Christoph M. Becker
1f7cc24df7 Merge branch 'pull-request/1930' into PHP-5.6 2016-06-09 15:28:58 +02:00
Jakub Zelenka
05033c9ebd Fix bug #72140 (segfault after calling ERR_free_strings()) 2016-06-08 18:21:39 +01:00
Pierre Joye
6d3fa654b7 prevent invalid color index (palette only), may lead to crash 2016-06-08 11:06:48 +07:00
Pierre Joye
f80125950c #72337 invalid dimensions can lead to segv 2016-06-07 17:16:40 +07:00
Anatol Belski
2a0ed8a2eb Add test for bug #53735 2016-06-06 21:06:06 +02:00
Anatol Belski
eaef8f6db2 fix typo 2016-06-06 08:56:40 +02:00
Anatol Belski
1b2afd478b fix broken skipif and add xfail for now 2016-06-06 08:20:01 +02:00
Anatol Belski
c05b417718 missing return 2016-06-06 07:28:12 +02:00
Jakub Zelenka
d4615d1118 Add new test for openssl_pkey_new 2016-06-05 17:27:47 +01:00
Jakub Zelenka
497fe33d6f Add test for openssl_error_string
This test is important for making sure that the error strings
from OpenSSL works as expected and we can safely add a fix
for storing the strings that is prepared.
2016-06-05 17:23:05 +01:00
Jakub Zelenka
5e9f387175 Remove openssl_x509_parse for OpenSSL 0.9.x
The test is unstable and it actually fails with latest 0.9.8
2016-06-05 16:28:50 +01:00
Raphaël Tournoy
1dfdae6de4 fix typo 2016-06-03 17:18:14 +02:00
Anatol Belski
22336db97f Fixed bug #70484 selectordinal doesn't work with named parameters 2016-06-02 12:17:42 +02:00
Elizabeth Marie Smith
72c9324d70 Fix ODBC bug for varchars returning with length zero 2016-06-02 12:04:10 +02:00
Remi Collet
4dd03651f3 Skip test which is 64bits only
Diff from test output
001+ Warning: fread(): Length parameter must be greater than 0 in ...
001- Warning: fread(): Length parameter must be no more than 2147483647 in ...
2016-05-25 16:40:52 +02:00
Remi Collet
ce932f6479 Skip test which is 64bits only
Diff from test output
001+ Warning: fread(): Length parameter must be greater than 0 in ...
001- Warning: fread(): Length parameter must be no more than 2147483647 in ...
2016-05-25 16:17:12 +02:00
Anatol Belski
65a2c451bb fix test portability 2016-05-25 11:19:19 +02:00
Stanislav Malyshev
2464b092eb Merge branch 'PHP-5.6.22' into PHP-5.6
* PHP-5.6.22:
  Fix memory leak in imagescale()
  Update NEWS
  Better fix for bug #72135
  Fixed bug #72227: imagescale out-of-bounds read
  Fix bug #72241: get_icu_value_internal out-of-bounds read
  Fix bug #72135 - don't create strings with lengths outside int range
  prepare for 5.6.22RC1
  Add check for string overflow to all string add operations
  Fix bug #72114 - int/size_t confusion in fread
  Updated NEWS
  Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()

Conflicts:
	configure.in
	main/php_version.h
2016-05-24 17:21:22 -07:00
Stanislav Malyshev
544940c48a Merge branch 'PHP-5.5' into PHP-5.6.22
* PHP-5.5:
  Fix memory leak in imagescale()
  Update NEWS
  Better fix for bug #72135
  Fixed bug #72227: imagescale out-of-bounds read
  Fix bug #72241: get_icu_value_internal out-of-bounds read
  Fix bug #72135 - don't create strings with lengths outside int range
  Add check for string overflow to all string add operations
  Fix bug #72114 - int/size_t confusion in fread
  Updated NEWS
  Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()

Conflicts:
	Zend/zend_operators.c
	ext/phar/dirstream.c
	ext/phar/tests/bug71331.phpt
2016-05-24 16:56:36 -07:00
Stanislav Malyshev
9a826a3bd9 Fix memory leak in imagescale() 2016-05-24 16:12:01 -07:00
Stanislav Malyshev
e955913115 Better fix for bug #72135 2016-05-24 15:52:15 -07:00
Stanislav Malyshev
7a1aac3343 Fixed bug #72227: imagescale out-of-bounds read
Ported from 4f65a3e4ee
2016-05-23 00:34:35 -07:00
Stanislav Malyshev
97eff7eb57 Fix bug #72241: get_icu_value_internal out-of-bounds read 2016-05-22 17:49:02 -07:00
Derick Rethans
f43f6fc39b Fixed bug #63740 (strtotime seems to use both sunday and monday as start of week) 2016-05-18 12:19:11 +01:00
Stanislav Malyshev
0da8b8b801 Fix bug #72135 - don't create strings with lengths outside int range 2016-05-15 23:26:51 -07:00
Dmitry Stogov
90f43caf5b The "flock" structure has to be writable on AIX. 2016-05-10 17:50:14 +03:00
Stanislav Malyshev
abd159cce4 Fix bug #72114 - int/size_t confusion in fread 2016-05-09 21:55:29 -07:00
Anatol Belski
1cc536af5a Revert "Backport patch for bug #71820"
This reverts commit 1b632cfe83.

This fixed bug #72151, and reverts the fix for bug #71820.
See also bug #50636 and #49521 for the history.
2016-05-09 17:15:40 +02:00
Anatol Belski
5351151352 add test fo rbug 71805 2016-05-03 19:09:11 +02:00
Stanislav Malyshev
9649ca1630 Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream() 2016-04-28 20:57:44 +03:00
Anatol Belski
a21a997478 fix/improve tests 2016-04-27 13:16:57 +02:00
Stanislav Malyshev
e315a162da Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix memory leak
  Fix bug #72099: xml_parse_into_struct segmentation fault
  5.5.36 now
  Fix bug #72094 - Out of bounds heap read access in exif header processing
  Fix bug #72093: bcpowmod accepts negative scale and corrupts _one_ definition
  Fix bug #72061 - Out-of-bounds reads in zif_grapheme_stripos with negative offset
  Fix for bug #71912 (libgd: signedness vulnerability)
  Typo in NEWS

Conflicts:
	configure.in
	main/php_version.h
2016-04-26 23:48:41 -07:00
Stanislav Malyshev
61c7a06e7c Fix memory leak 2016-04-26 22:54:58 -07:00
Stanislav Malyshev
dccda88f27 Fix bug #72099: xml_parse_into_struct segmentation fault 2016-04-26 22:46:28 -07:00
Dmitry Stogov
9f389cccfd Fixed test on 32-bit platforms (split into 32-bit and 64-bit versions) 2016-04-26 13:43:18 +03:00
Stanislav Malyshev
082aecfc3a Fix bug #72094 - Out of bounds heap read access in exif header processing 2016-04-24 19:33:52 -07:00
Stanislav Malyshev
d650063a04 Fix bug #72093: bcpowmod accepts negative scale and corrupts _one_ definition
We can not modify result since it can be copy of _zero_ or _one_, etc. and
"copy" in bcmath is just bumping the refcount.
2016-04-24 18:33:32 -07:00
Stanislav Malyshev
fd9689745c Fix bug #72061 - Out-of-bounds reads in zif_grapheme_stripos with negative offset 2016-04-24 13:15:17 -07:00
Stanislav Malyshev
c02301b666 Better fix for #71952 2016-04-19 23:44:00 -07:00
Stanislav Malyshev
f061867fd3 Fix bug #71952: Corruption inside imageaffinematrixget 2016-04-18 23:33:21 -07:00
Stanislav Malyshev
b15f0ecc0f Fix for bug #71912 (libgd: signedness vulnerability) 2016-04-18 22:24:16 -07:00
Christopher Jones
d1e81a59a7 Fix old comment cut-n-paste error 2016-04-14 15:08:42 +10:00
Christopher Jones
8f2e6da806 Fixed bug #71422 (Fix ORA-01438: value larger than specified precision allowed for this column) 2016-04-14 13:50:01 +10:00
Lior Kaplan
c1f597d9a1 opcache config.m4: Use = for comparison 2016-04-08 22:38:07 +03:00
Thomas Punt
1aea777349 Use STR_EMPTY_ALLOC macro instead 2016-04-05 11:18:14 +02:00
Thomas Punt
40f14bad33 Fix DateInterval::format segfault 2016-04-05 11:18:14 +02:00
Matteo Beccati
30925cd498 Fixed bug #71447 (Quotes inside comments not properly handled) 2016-04-04 23:50:28 +02:00
Matteo Beccati
9a87108eca Fixed a few PDO tests to conform to PDO Common standards 2016-04-04 23:43:17 +02:00
Anatol Belski
a00c2b1bf5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix borked mainstream patch
  5.5.35 now
2016-03-31 01:36:47 +02:00
Anatol Belski
4b0b1cec00 fix borked mainstream patch 2016-03-31 01:33:38 +02:00
Anatol Belski
ed707a5217 fix test to not to cause false positives 2016-03-31 01:29:05 +02:00
Anatol Belski
23d0065744 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix dir separator in test
2016-03-29 14:19:35 +02:00
Anatol Belski
551423c642 fix dir separator in test 2016-03-29 14:18:25 +02:00
Anatol Belski
5272184a1e Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file
The actual fix is applying the upstream patch from
6713ca45e7
2016-03-29 13:11:25 +02:00
Anatol Belski
84990ab346 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file
2016-03-29 13:11:17 +02:00
Anatol Belski
fe13566c93 Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file
The actual fix is applying the upstream patch from
6713ca45e7
2016-03-29 13:10:39 +02:00
Stanislav Malyshev
cc7631dd08 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #71704 php_snmp_error() Format String Vulnerability
2016-03-28 23:45:15 -07:00
Anatol Belski
9c19a08b9d Fixed bug #71704 php_snmp_error() Format String Vulnerability
Conflicts:
	ext/snmp/snmp.c
2016-03-28 23:42:19 -07:00
Stanislav Malyshev
62da5cdf3d Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
  Fix bug #71798 - Integer Overflow in php_raw_url_encode
  Fix bug #71860: Require valid paths for phar filenames
  Going for 5.5.34

Conflicts:
	configure.in
	ext/phar/tests/create_path_error.phpt
	main/php_version.h
2016-03-28 23:21:15 -07:00
Stanislav Malyshev
f8dd10508b Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut 2016-03-28 23:15:16 -07:00
Stanislav Malyshev
95433e8e33 Fix bug #71798 - Integer Overflow in php_raw_url_encode 2016-03-27 14:22:19 -07:00
Nikita Popov
54da966883 Fixed bug #67512 2016-03-25 20:18:46 +01:00
Derick Rethans
c4681ec8e1 Updated to version 2016.3 (2016c) 2016-03-24 11:09:05 +00:00
Julien Pauli
d3d64b7c62 Reworked Fix bug #52098 2016-03-21 15:23:18 +01:00
Daniel Persson
e541cd8e6b Fix bug #52098 2016-03-21 15:04:11 +01:00
Xinchen Hui
056459dc9d Merge branch 'PHP-5.6' of https://github.com/msierks/php-src into PHP-5.6
* 'PHP-5.6' of https://github.com/msierks/php-src:
  FIX #71831: CURLOPT_NOPROXY applied as long instead of string
2016-03-21 16:39:22 +08:00
Stanislav Malyshev
72281f29dd Fix bug #71860: Require valid paths for phar filenames 2016-03-20 21:33:11 -07:00
Nikita Popov
cc3cdd0057 Fixed bug #67582 2016-03-20 17:46:12 +01:00
Michael Sierks
efacdc3511 FIX #71831: CURLOPT_NOPROXY applied as long instead of string
The CURLOPT_NOPROXY option value is converted to a long before
being applied as a curl option. This causes the option to have
no effect. This patch changes this conversion to a string.
2016-03-18 07:29:01 -05:00
Anatol Belski
1b632cfe83 Backport patch for bug #71820
Rev b4eedd128b
2016-03-17 14:28:58 +01:00
Xinchen Hui
eb405623ec Merge branch 'PHP-5.6' of git.php.net:/php-src into PHP-5.6
* 'PHP-5.6' of git.php.net:/php-src:
  fix NEWS
  NEWS
  Fix Bug #63171 	Script hangs after max_execution_time
2016-03-17 21:27:23 +08:00
Remi Collet
407ad28ae5 Fix Bug #63171 Script hangs after max_execution_time
If aborted via timer expiration, don't try to call any unixODBC function
which may hangs because of internal locks
2016-03-17 13:38:45 +01:00
Xinchen Hui
8e2f658f49 Fixed bug #71843 (null ptr deref ZEND_RETURN_SPEC_CONST_HANDLER) 2016-03-17 19:54:19 +08:00
Xinchen Hui
6d4aec029a Fixed test script 2016-03-17 17:06:56 +08:00
Xinchen Hui
ead7632cf9 Fixed test script 2016-03-17 15:23:44 +08:00
Xinchen Hui
6f241f5fad Fixed bug #71840 (Unserialize accepts wrongly data) 2016-03-17 15:15:28 +08:00
Remi Collet
478c807128 fix #ifdef usage 2016-03-16 07:17:49 +01:00
Derick Rethans
ddc62f2e8b Updated to version 2016.2 (2016b) 2016-03-15 09:14:09 +00:00
Anatol Belski
beda05269c fix test
Many warnings won't appear with libxml2 >= 2.9.3 because in many
cases libxml2 2.9.3 will just abort processing.
2016-03-14 15:53:02 +01:00
Thomas Punt
f3f5a07aa5 Fix DatePeriod::getEndDate() segfault 2016-03-11 14:08:48 +01:00
Anatol Belski
8cd903ea68 fix error condition, part of bug #71753 2016-03-10 11:35:50 +01:00
Xinchen Hui
915a3762ef Fixed typo (partially fix for #71753) 2016-03-10 15:22:34 +08:00
Anatol Belski
a1d1f54b42 fix directory separator 2016-03-09 14:16:29 +01:00
Anatol Belski
8ca02bb233 fix regression introduced in 5683b6fa39
Test extended. Basically, both iterator type and next node have
to be checked.
2016-03-08 12:59:59 +01:00
Anton Blanchard
ccd215a517 Additional improvements to crypt() detection code
Reformat to normalize tabs vs spaces, return 1 if crypt.h not
defined, fix C99 compliance.
2016-03-03 17:28:34 +01:00
Michael Orlitzky
08fce8e2c5 ext/standard/config.m4: fix crypt() test segfaults in >=glibc-2.17.
Starting with glibc-2.17, the crypt() function will report an EINVAL
and return NULL when the format of the "salt" parameter is
invalid. The current tests for crypt() pass its result to strcmp(),
causing segfaults when the value returned from crypt() is NULL.

This commit modifies the test programs to exit with failure when
crypt() returns NULL.

Reference: https://bugs.gentoo.org/show_bug.cgi?id=518964
2016-03-03 17:12:57 +01:00
Anatol Belski
2399c64eaf show correct MINFO with libpq >= 9.5.x 2016-03-02 17:03:20 +01:00
Stanislav Malyshev
b3bb1aacfe Merge branch 'PHP-5.6.19' into PHP-5.6
* PHP-5.6.19:
  fix test file
  Fix version
  Update NEWS
2016-03-01 22:56:08 -08:00
Stanislav Malyshev
6e6a556b8c Merge branch 'PHP-5.5' into PHP-5.6.19
* PHP-5.5:
  fix test file
  Fix version
  Update NEWS
2016-03-01 22:55:49 -08:00
Stanislav Malyshev
3c8ccdd9d3 fix test file 2016-03-01 22:55:02 -08:00
Stanislav Malyshev
ae3f132be1 Merge branch 'PHP-5.6.19' into PHP-5.6
* PHP-5.6.19:
  update NEWS
  Fix bug #71498: Out-of-Bound Read in phar_parse_zipfile()
  fix ts buld
  prep for 5.6.19RC1
  Fixed bug #71587 - Use-After-Free / Double-Free in WDDX Deserialize
2016-03-01 22:42:16 -08:00
Stanislav Malyshev
91990bbde0 Merge branch 'PHP-5.5.33' into PHP-5.6.19
* PHP-5.5.33:
  Fix bug #71498: Out-of-Bound Read in phar_parse_zipfile()
  Fixed bug #71587 - Use-After-Free / Double-Free in WDDX Deserialize
2016-03-01 22:40:00 -08:00
Xinchen Hui
20add1e530 Merge branch 'PHP-5.6-bug_69757' of https://github.com/wayfair/php-src into PHP-5.6
* 'PHP-5.6-bug_69757' of https://github.com/wayfair/php-src:
  limit size of result set so unit test runs reliably
2016-03-02 14:26:34 +08:00
Nikita Popov
471540d285 Fix intermittent failure of bug_68819_002.phpt
The test used rand(32, 127) to select the character, however
chr(127) results in "data" instead of the expected result, so this
test would fail in something like 1% of the runs.

Replace rand() with fixed character "a".
2016-03-02 00:34:36 +01:00
mpyw
0bbea60524 Fix bug #71694
Exports contants CURLM_ADDED_ALREADY.
2016-03-01 23:31:58 +01:00
Adam Baratz
2e18d438b0 limit size of result set so unit test runs reliably 2016-03-01 17:15:36 -05:00
Jos Elstgeest
50b4cafd28 Fixed bugs #71317 and #71504
If there are duplicate filenames in tar, the last one wins.
2016-02-29 22:34:35 +01:00
Anatol Belski
d78220fb2c add test for bug #68957 2016-02-29 18:43:03 +01:00
Anatol Belski
53c036b30b Fixed #54648 PDO::MSSQL forces format of datetime fields
adopted patch by steven dot lambeth at gmx dot de
2016-02-29 17:04:49 +01:00
Anatol Belski
7816698580 remove unneeded free parts
See bug #71667, free_statement already does the job
2016-02-29 16:26:46 +01:00
Anatol Belski
d7fd614cc6 fix leaks and add one more NULL check 2016-02-29 15:38:42 +01:00
Anatol Belski
a310c3b484 add NULL check 2016-02-29 15:26:57 +01:00
Anatol Belski
efaafd45b4 fix C89 compat 2016-02-29 15:24:31 +01:00
Anatol Belski
35be4398d1 fix arg type 2016-02-29 15:23:53 +01:00
Anatol Belski
90ad6e3c6c add test for bug #47803 2016-02-24 11:49:02 +01:00
Anatol Belski
ff115e285a Fixed bug #47803
Executing prepared statements is succesfull only for the first two statements

The reworked patch descends to the bug #69526 which is fixed by
this as well. The broken logic in the current code was, that
SQLDescribeParam was executed in odbc_execute every time. This piece
is now moved into odbc_prepare and the results are carried on in an
additional structure.

Since the ext/odbc headers are not being currently installed and the
corresponding structs like odbc_result are not used outside ext/odbc,
the binary compatibility persists. Executing SQLDescribeParam only once
in odbc_prepare is also an optimization as the filds usually won't
change that fast and thus requestind the descriptions on every
execution is not required.
2016-02-24 11:40:35 +01:00
Anatol Belski
9623d2dd83 make ext/odbc test credentials configurable 2016-02-23 14:21:04 +01:00
Remi Collet
d20f1d8f1f cleanup $Id 2016-02-22 09:26:00 +01:00
Stanislav Malyshev
a6fdc5bb27 Fix bug #71498: Out-of-Bound Read in phar_parse_zipfile() 2016-02-21 16:51:05 -08:00