Commit Graph

459 Commits

Author SHA1 Message Date
Remi Collet
53a08fd07d make type consistent with glob_t.gl_pathc 2017-03-01 17:01:58 +01:00
Remi Collet
c836ad1c7e fix test for libzip 1.2.0 2017-02-19 17:02:00 +01:00
Stanislav Malyshev
43d0f2abc5 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Update more functions with path check
2017-01-15 17:32:26 -08:00
Stanislav Malyshev
0ab1af7d3e Update more functions with path check 2017-01-15 17:31:08 -08:00
Mitch Hagstrand
ad08aa3956 Fix #70103: Fix bug 70103 when ZTS is enabled
Used snprintf to copy the basename string before it is freed
2017-01-06 15:26:17 +01:00
Joe Watkins
a49aaf9ab0
Merge branch 'pull-request/1430' into PHP-7.0
* pull-request/1430:
  Fix #70103: ZipArchive::addGlob ignores remove_all_path option
  news entry for PR 1430
2017-01-06 05:39:48 +00:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Stanislav Malyshev
1fd18821e0 More string length checks & fixes 2016-11-03 21:35:09 -07:00
Stanislav Malyshev
6e12e49b5b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  More string length checks & fixes
2016-11-03 20:46:25 -07:00
Stanislav Malyshev
ea9fac94bb More string length checks & fixes 2016-11-03 20:36:52 -07:00
Remi Collet
f1cf340e19 bump ext/zip version 2016-10-14 17:31:07 +02:00
Christoph M. Becker
81ec843d0e Merge branch 'PHP-5.6' into PHP-7.0 2016-09-06 01:15:36 +02:00
Christoph M. Becker
8aad3131a1 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.
2016-09-06 01:03:46 +02:00
Christoph M. Becker
356b586ec1 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-17 12:47:06 +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
ad96a052d9 Fixed bug #72660 (NULL Pointer dereference in zend_virtual_cwd) 2016-07-24 23:58:22 +08:00
Remi Collet
a2a122804e bump zip extension version 2016-07-21 08:44:26 +02:00
Stanislav Malyshev
df5ee7bc25 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Improve fix for #72520
  #72482, revert for 5.6 for now

Conflicts:
	ext/zip/zip_stream.c
2016-07-19 22:38:35 -07:00
Stanislav Malyshev
17a53f9e60 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Improve fix for #72520
2016-07-19 22:37:44 -07:00
Stanislav Malyshev
8ebdb1f5fd Improve fix for #72520 2016-07-19 22:37:03 -07:00
Stanislav Malyshev
b00f8f2a5b Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix #72519, possible OOB using imagegif
  fix #72512, invalid read or write for palette image when invalid transparent index is used
  Apparently some envs miss SIZE_MAX
  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
  Fix for bug #72513
  CS fix and comments with bug ID
  Fix for HTTP_PROXY issue.
  5.6.24RC1
  add tests for bug #72512
  Fixed bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access
  Fixed bug #72479 - same as #72434

Conflicts:
	Zend/zend_virtual_cwd.c
	ext/bz2/bz2.c
	ext/exif/exif.c
	ext/session/session.c
	ext/snmp/snmp.c
	ext/standard/basic_functions.c
	main/SAPI.c
	main/php_variables.c
2016-07-19 01:39:28 -07:00
Stanislav Malyshev
4d0565b5ba Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix #72519, possible OOB using imagegif
  fix #72512, invalid read or write for palette image when invalid transparent index is used
  Apparently some envs miss SIZE_MAX
  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

Conflicts:
	ext/bz2/bz2.c
	main/SAPI.c
	main/php_variables.c
2016-07-19 00:53:08 -07:00
Stanislav Malyshev
81406c0c1d Fix fir bug #72520 2016-07-12 22:05:00 -07:00
Remi Collet
69fd1133d0 bump zip version 2016-06-21 11:16:21 +02:00
Stanislav Malyshev
2a65544f78 Merge branch 'PHP-5.6.23' into PHP-7.0.8
* PHP-5.6.23: (24 commits)
  iFixed 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
  Fix bug #72321 - use efree() for emalloc allocation
  5.6.23RC1
  Fix bug #72140 (segfault after calling ERR_free_strings())
  ...

Conflicts:
	configure.in
	ext/mbstring/php_mbregex.c
	ext/mcrypt/mcrypt.c
	ext/spl/spl_array.c
	ext/spl/spl_directory.c
	ext/standard/php_smart_str.h
	ext/standard/string.c
	ext/standard/url.c
	ext/wddx/wddx.c
	ext/zip/php_zip.c
	main/php_version.h
2016-06-21 00:24:32 -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
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
Anatol Belski
933d6b188c fix test title 2016-05-30 12:48:00 +02:00
Anatol Belski
97c530fece Add test for bug #72258 2016-05-30 12:47:04 +02:00
Anatol Belski
2c80459c24 Expose missing flags from libzip at least >= 0.11.x
These are helpful with reading/writing zips containing non UTF-8
filenames to mitigate possibly changed libzip behaviors.

Partial cherry-pick of 893c2405ff
2016-05-30 10:32:43 +02:00
Stanislav Malyshev
ccc12efa32 Fix bug #71923 - integer overflow in ZipArchive::getFrom* 2016-04-26 22:59:09 -07:00
Remi Collet
18e3b11d62 missing include 2016-02-22 18:45:18 +01:00
Remi Collet
0d57c06b2c update bundled libzip to 1.1.2 2016-02-22 18:18:30 +01:00
Remi Collet
e8385a60b3 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  cleanup $Id
2016-02-22 09:26:14 +01:00
Remi Collet
d20f1d8f1f cleanup $Id 2016-02-22 09:26:00 +01:00
Stanislav Malyshev
9afb29aa68 Remove TSRMLS_* from code, they are not used anymore 2016-02-17 22:44:05 -08:00
Nikita Popov
c9357f82d3 Format string fixes
Conflicts:
	ext/pgsql/pgsql.c
2016-02-14 14:45:53 +01:00
Xinchen Hui
33417bf409 Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
	ext/zip/php_zip.c
2016-02-09 23:35:55 +08:00
Xinchen Hui
f45752eb83 Fixed bug #71561 (NULL pointer dereference in Zip::ExtractTo) 2016-02-09 23:32:20 +08:00
Stanislav Malyshev
e231830f16 Merge branch 'PHP-5.6.18' into PHP-7.0.3
* PHP-5.6.18:
  fix tests
  fix NEWS
  Update NEWS
  update NEWS
  Fixed bug #71488: Stack overflow when decompressing tar archives
  update NEWS
  add missing headers for SIZE_MAX
  backport the escapeshell* functions hardening branch
  add tests
  Fix bug #71459 - Integer overflow in iptcembed()
  prepare 5.6.18RC1
  Fix test when run with openssl < 1.0.2 (reorder so no more SSLv2 message) Fix skip message to work
  improve fix for bug #71201
  Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input
  Fix bug #71391: NULL Pointer Dereference in phar_tar_setupmetadata()
  Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream()
  Fix bug #71335: Type Confusion in WDDX Packet Deserialization
  Fix bug #71354 - remove UMR when size is 0

Conflicts:
	configure.in
	ext/phar/dirstream.c
	ext/phar/phar_object.c
	ext/phar/tar.c
	ext/standard/exec.c
	ext/standard/iptc.c
	ext/standard/math.c
	ext/standard/streamsfuncs.c
	ext/wddx/wddx.c
	main/php_version.h
	main/streams/memory.c
2016-02-01 20:00:01 -08:00
Stanislav Malyshev
24167095a5 Merge branch 'PHP-5.5' into PHP-5.6.18
* PHP-5.5:
  fix tests
  fix NEWS
  update NEWS
2016-02-01 19:15:19 -08:00
Stanislav Malyshev
2a7d8c0a06 fix tests 2016-02-01 18:58:02 -08:00
Lior Kaplan
59a7ef914f Update header to PHP Version 7 2016-01-01 20:03:16 +02:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Dmitry Stogov
ad4fa8f758 Fixed incorrect usage of HASH_OF() macro. Replaced HASH_OF() with more appropriate Z_ARRVAL_P() or Z_OBJPROP_P(). 2015-09-24 22:39:59 +03:00
Xinchen Hui
ed5a5bdff8 Fixed bug #70544 (ext/zip/tests/oo_addglob.phpt broken on Solaris) 2015-09-21 22:04:27 +08:00
Remi Collet
db99b877f0 ext/zip version is now 1.13.0 2015-09-07 14:04:20 +02:00
Remi Collet
a5d6cf788e Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix build
2015-09-07 13:55:19 +02:00
Remi Collet
debfc866d2 Fix build
php_zip.c:1647:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
php_zip.c:1648:3: error: format not a string literal and no format arguments [-Werror=format-security]
2015-09-07 13:52:28 +02:00