Commit Graph

365 Commits

Author SHA1 Message Date
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Stanislav Malyshev
f7f8aae33c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  More int->size_t and string overflow fixes
2016-11-05 13:59:35 -07:00
Stanislav Malyshev
669763d88a More int->size_t and string overflow fixes 2016-11-05 13:22:17 -07:00
Xinchen Hui
566d65d222 Fixed bug #72888 (Segfault on clone on splFileObject) 2016-08-19 11:28:36 +08:00
Christoph M. Becker
a6953e70e5 Merge branch 'PHP-7.0' into PHP-7.1 2016-07-22 15:29:18 +02:00
Christoph M. Becker
9a2207c90a Merge branch 'PHP-5.6' into PHP-7.0
# Resolved conflicts:
#	ext/spl/spl_directory.c
2016-07-22 15:27:55 +02:00
Christoph M. Becker
6b116932b2 Fix #72646: SplFileObject::getCsvControl does not return the escape character
This has obviously been missed when adding the $escape parameter to
SplFileObject::setCsvControl() in PHP 5.3, so we catch up on this.
2016-07-22 15:24:50 +02:00
Christoph M. Becker
411c809787 Merge branch 'PHP-7.0' 2016-07-05 16:56:39 +02:00
Christoph M. Becker
c015095042 Merge branch 'PHP-5.6' into PHP-7.0
# Resolved conflicts:
#	ext/spl/spl_directory.c
2016-07-05 16:43:39 +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
Aaron Piotrowski
24237027bc Merge branch 'throw-error-in-extensions' 2016-07-05 02:08:39 -05:00
Dmitry Stogov
0cfb47651c Fixed compilation warnings 2016-06-28 11:37:51 +03:00
Dmitry Stogov
323b2733f6 Fixed compilation warnings 2016-06-22 00:40:50 +03:00
Dmitry Stogov
1616038698 Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03: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
7245bff300 Fix bug #72262 - do not overflow int 2016-06-15 21:58:26 -07:00
Aaron Piotrowski
771e5cc247 Replace zend_ce_error with NULL and replace more E_ERROR with thrown Error 2016-06-13 09:02:17 -05:00
Aaron Piotrowski
e3c681aa5c Merge branch 'master' into throw-error-in-extensions 2016-06-10 22:02:23 -05:00
Dmitry Stogov
926857708b Merge branch 'PHP-7.0'
* PHP-7.0:
  size_t is unsigned and can't be negative
2016-04-29 12:24:13 +03:00
Dmitry Stogov
ddac2852dc size_t is unsigned and can't be negative 2016-04-29 12:23:30 +03:00
Dmitry Stogov
f0a2e8eb13 Removed "zend_fcall_info.function_table". It was assigned in many places, but is never used. 2016-04-27 13:46:38 +03:00
Dmitry Stogov
c67c166f93 Removed zend_fcall_info.symbol_table 2016-03-02 17:50:55 +03:00
Stanislav Malyshev
9afb29aa68 Remove TSRMLS_* from code, they are not used anymore 2016-02-17 22:44:05 -08:00
Lior Kaplan
3d5438bf7b Merge branch 'PHP-7.0'
* PHP-7.0:
  Update header to PHP Version 7
  Happy new year (Update copyright to 2016)
  Happy new year (Update copyright to 2016)
2016-01-01 20:04:31 +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
Tom Van Looy
618b961124 Remove leftovers of TSRMLS in code 2015-12-25 11:13:39 +01:00
Tom Van Looy
aadb3dd503 These function docs are referencing zend_object_value but this should be zend_object 2015-12-24 10:24:53 +01:00
Stanislav Malyshev
26e5429f72 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix bug #64172
  Bug #70561: Fix DirectoryIterator to throw OutOfBoundsException

Conflicts:
	ext/pdo/pdo_dbh.c
2015-10-18 17:20:00 -07:00
Bishop Bettini
368d3ff0d9 Bug #70561: Fix DirectoryIterator to throw OutOfBoundsException
-------------------------------------------------------------------------------
DirectoryIterator implements SeekableIterator, which "should throw an
OutOfBoundsException if the position is not seekable". As is, seek just returns
and one must call valid(). This approach is different than most (all?) other
SeekableIterator implementations and leads to developer confusion. See the
bug report for a specific example.
2015-09-23 11:14:52 -04:00
Dmitry Stogov
e45f67245a Cleanup: don't keep useless dangling pointer 2015-09-22 17:48:25 +03:00
Anthony Ferrara
21686f1b30 Revert SplFileInfo BC break while keeping fix for assertion removal
This reverts the minor bc-break where .test would return an empty extension. This is different from 5.x's behavior.

In 7, it would result in an assertion failure crash. The fix for the removal of this assertion is kept, keeping BC with 5.x.
2015-07-13 13:27:06 -04:00
Anthony Ferrara
4b78636f3f Fix issue with SplFileInfo::getExtension() on files with only a leading '.' character
Currently, there is an assert() that fails on files like .gitignore crashing PHP. This patch fixes that.
Instead, now an empty string is returned (since the file has no extension). A test has been added to test this behavior.
2015-07-13 13:12:45 -04:00
Aaron Piotrowski
7ec1e17464 Update memory freeing and other issues, revert some changes 2015-07-05 23:25:53 -05:00
Aaron Piotrowski
907476f34c Convert E_ERROR to thrown Error in extensions 2015-07-05 12:16:57 -05:00
Dmitry Stogov
7d82deab35 Cleanup (avoid reallocation). 2015-07-01 14:08:54 +03:00
Dmitry Stogov
53403fe56d Get rid of ZVAL_ZVAL() macro usages. Replace them with more clear and optimal equialent sequences. 2015-07-01 02:05:21 +03: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
Rasmus Lerdorf
28d7bb97a1 Fix more proto comments 2015-06-23 17:46:20 -04:00
Dmitry Stogov
8e10e8f921 Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
2015-06-12 12:33:23 +03:00
Anatol Belski
3c02e6f457 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  updated NEWS
  Fix bug #67805 - SplFileObject setMaxLineLength.
2015-06-08 12:11:58 +02:00
Willian Gustavo Veiga
b470d9a0d6 Fix bug #67805 - SplFileObject setMaxLineLength. 2015-06-08 12:08:05 +02:00
Willian Gustavo Veiga
8e747f6833 Fix bug #67805 - SplFileObject setMaxLineLength. 2015-06-08 11:36:27 +02:00
Dmitry Stogov
4d9a1883aa Fixed bug #68887 (resources are not freed correctly) 2015-04-08 13:29:42 +03:00
Nikita Popov
122d759618 Always throw TypeException on throwing zpp failures
Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to
report FAILURE errors using a TypeException instead of a Warning,
like it would happen in strict mode.

Adds a zend_parse_parameters_throw() convenience function, which
invokes zpp with this flag.

Converts all cases I could identify, where we currently have
throwing zpp usage in constructors and replaces them with this API.
Error handling is still replaced to EH_THROW in some cases to handle
other, domain-specific errors in constructors.
2015-04-06 11:27:34 +02:00
Dmitry Stogov
ea09a9fa32 Convert fatal errors into EngineExceptions
Make zval_update_constant_ex(), zval_update_constant(), zend_update_class_constants() and zend_ast_evaluate() return SUCCESS or FAILURE.
2015-04-02 02:05:25 +03:00
Julien Pauli
72af5cda27 Merge branch 'PHP-5.6'
* PHP-5.6:
  fix #68557

Conflicts:
	ext/spl/spl_directory.c
2015-02-20 15:40:46 +01:00
Julien Pauli
13c3b78f1e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix #68557
2015-02-20 15:38:48 +01:00
Julien Pauli
c111d1cd70 fix #68557 2015-02-20 15:09:35 +01:00