Commit Graph

411 Commits

Author SHA1 Message Date
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
Christoph M. Becker
0836d6484c Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix #70322: ZipArchive::close() doesn't indicate errors
2015-09-05 00:43:41 +02:00
Christoph M. Becker
c77f783777 Fix #70322: ZipArchive::close() doesn't indicate errors
If an archive can't be written, ZipArchive::close() nonetheless returns TRUE.
We fix the return value to properly return success, and additionally raise a
warning on failure.
2015-09-05 00:34:10 +02:00
Kalle Sommer Nielsen
4481be5d26 Fix build on Windows 2015-09-04 17:49:48 +02:00
Stanislav Malyshev
9b1a224d4e Merge branch 'PHP-5.6'
* PHP-5.6: (21 commits)
  fix unit tests
  update NEWS
  add NEWS for fixes
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix bug ##70284 (Use after free vulnerability in unserialize() with GMP)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  ...

Conflicts:
	ext/exif/exif.c
	ext/gmp/gmp.c
	ext/pcre/php_pcre.c
	ext/session/session.c
	ext/session/tests/session_decode_variation3.phpt
	ext/soap/soap.c
	ext/spl/spl_observer.c
	ext/standard/var.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	ext/xsl/xsltprocessor.c
2015-09-02 00:37:20 -07:00
Stanislav Malyshev
c19d59c550 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  add NEWS for fixes
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  5.4.45 next

Conflicts:
	ext/pcre/php_pcre.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	ext/zip/php_zip.c
2015-09-01 12:06:41 -07:00
Stanislav Malyshev
33d3acaae7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Improve fix for #70172
  Fix bug #70312 - HAVAL gives wrong hashes in specific cases
  fix test
  add test
  Fix bug #70366 - use-after-free vulnerability in unserialize() with SplDoublyLinkedList
  Fix bug #70365 - use-after-free vulnerability in unserialize() with SplObjectStorage
  Fix bug #70172 - Use After Free Vulnerability in unserialize()
  Fix bug #70388 - SOAP serialize_function_call() type confusion
  Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories
  Improve fix for #70385
  Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
  Fix bug #70385 (Buffer over-read in exif_read_data with TIFF IFD tag byte value of 32 bytes)
  Fix bug #70219 (Use after free vulnerability in session deserializer)
  Fix for bug #69782
  Add CVE IDs asigned (post release) to PHP 5.4.43
  Add CVE IDs asigned to #69085 (PHP 5.4.39)
  5.4.45 next

Conflicts:
	configure.in
	ext/pcre/php_pcre.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_version.h
2015-09-01 11:42:19 -07:00
Stanislav Malyshev
906f19f136 fix test 2015-09-01 00:59:31 -07:00
Stanislav Malyshev
f9c2bf73ad Fixed bug #70350: ZipArchive::extractTo allows for directory traversal when creating directories 2015-08-30 00:38:08 -07:00
Anatol Belski
09970d8031 Revert "fix occasional fail in zip_close when target arc exists"
This reverts commit ed78d59a1d.
2015-08-19 19:00:53 +02:00
Anatol Belski
e6aa1fb249 fix config.w32 to include suitable lib files 2015-08-19 19:00:51 +02:00
Anatol Belski
026b41ba66 improve error message 2015-08-19 15:23:23 +02:00
Anatol Belski
ed78d59a1d fix occasional fail in zip_close when target arc exists 2015-08-19 15:23:21 +02:00
Christoph M. Becker
1a7db40a1f Fix #53854: Missing constants for compression type
The constants have already been added long ago. This patch just adds a PHPT
which checks the recognition of the respective compression methods.
Unfortunately, I've not been able to assemble a zip with all compression
methods.
2015-07-23 21:36:14 +02:00
Anatol Belski
545b364d56 remove TSRMLS_*
either remains or merged in from PHP5
2015-08-02 13:42:01 +02:00
Christoph M. Becker
50fd9d0c04 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix #53854: Missing constants for compression type
2015-07-23 21:43:40 +02:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Nikita Popov
5d3cf577aa Make convert_to_* safe with rc>1
This only involves switching zval_dtor to zval_ptr_dtor for arrays
and making the convert_to_object for arrays a bit more generic.

All the other changes outside zend_operators.c just make use of
this new ability (use COPY instead of DUP).

What's still missing: Proper references handling. I've seen many
convert_to* calls that will break when a reference is used.

Also fixes bug #69788.
2015-06-11 23:23:57 +02:00
Christoph M. Becker
c3c87e4996 return FALSE instead of NULL from ZipArchive::getStream when php_stream_zip_open() fails (fixes #67161) 2015-05-12 14:32:05 +02:00
Remi Collet
f122cc257c set ext/zip version to 1.13 (as we have new methods... semver...) 2015-05-07 10:41:48 +02:00
Remi Collet
d1363e30fd better fix (also fix i386 build) 2015-05-06 16:59:50 +02:00
Remi Collet
31f95eaefb try to fix build when LONG_MAX not defined 2015-05-06 16:24:21 +02:00
Remi Collet
3a55ea02aa add ZipArchive::setCompressionName and ZipArchive::setCompressionIndex methods 2015-05-06 15:16:43 +02:00
Remi Collet
3638ac2300 don't use deprecated libzip call 2015-05-06 15:16:43 +02:00
Remi Collet
9e0cc7a1d9 update libzip to version 1.0.1 2015-05-06 15:16:43 +02:00
Nikita Popov
40e465e357 Clean up some type conversions
While at it also fix some type checks in iconv and drop dead and
unported code in standard/filters.
2015-04-27 18:50:08 +02:00
Remi Collet
c48bf6e55c Merge branch 'PHP-5.6'
* PHP-5.6:
  bump zip release to match pecl version
2015-04-15 17:38:01 +02:00
Remi Collet
60b3526bfb bump zip release to match pecl version 2015-04-15 17:37:12 +02:00
Lior Kaplan
59c2a55ec7 Fix typo: unitialized -> uninitialized 2015-04-01 18:17:53 +03:00
Rasmus Lerdorf
4d10e15845 Fix a couple of warnings 2015-03-20 23:32:07 -07:00
Stanislav Malyshev
1ecd82f588 Merge branch 'PHP-5.6'
* PHP-5.6:
  update NEWS
  Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary
  oops, no idea how this got in
  Fix bug #69248 - heap overflow vulnerability in regcomp.c
  add test for bug #68976
  add NEWS
  Fixed bug #68976 - Use After Free Vulnerability in unserialize()
  update news
  Fixed bug #69134 (Per Directory Values overrides PHP_INI_SYSTEM configuration options)
  fix tests
  Fix bug #69207 - move_uploaded_file allows nulls in path

Conflicts:
	ext/ereg/regex/regcomp.c
	ext/standard/basic_functions.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	win32/registry.c
2015-03-17 22:04:39 -07:00
Stanislav Malyshev
225cb973e5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary

Conflicts:
	ext/zip/lib/zip_dirent.c
2015-03-17 22:03:24 -07:00
Stanislav Malyshev
53eff4a369 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary
2015-03-17 22:00:29 -07:00
Stanislav Malyshev
ef8fc4b53d Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary 2015-03-17 21:59:56 -07:00
Dmitry Stogov
8633685675 Use specialized macro for string zval creation 2015-03-12 16:53:51 +03:00
zxcvdavid
f1de275e74 Remove the unused vars 2015-03-04 09:52:09 +08:00
Dmitry Stogov
2fa8d67a5c Use zend_string* instead of char* for opened_patch handling. Avoid reallocations and improve string reuse. 2015-03-04 02:05:28 +03:00
Dmitry Stogov
9e70d7672d Move zend_object->guards into additional slot of zend_object->properties_table[]. As result size of objects without __get/__set/__unset/__isset magic methods is reduced. 2015-02-04 15:24:13 +03:00
Xinchen Hui
942809909e Cleanup resource handling APIs 2015-02-02 13:23:16 +08:00
Xinchen Hui
b21d9123a5 Fixed #68826 (Resource leak) 2015-01-17 22:56:02 -05:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Andrea Faulds
8a065c554b Restored zip/oci8 PHP 4 code, add PHP 7 checks 2014-12-05 19:46:31 +00:00