summaryrefslogtreecommitdiff
path: root/ext/xml/xml.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow exceptions in __toString()Nikita Popov2019-06-051-1/+4
| | | | | | | | | | RFC: https://wiki.php.net/rfc/tostring_exceptions And convert some object to string conversion related recoverable fatal errors into Error exceptions. Improve exception safety of internal code performing string conversions.
* Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macrosDmitry Stogov2019-05-281-1/+2
|
* Remove local variablesPeter Kokot2019-02-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* Remove yearly range from copyright noticeZeev Suraski2019-01-301-1/+1
|
* Implement typed propertiesNikita Popov2019-01-111-5/+9
| | | | | | | | | | RFC: https://wiki.php.net/rfc/typed_properties_v2 This is a squash of PR #3734, which is a squash of PR #3313. Co-authored-by: Bob Weinand <bobwei9@hotmail.com> Co-authored-by: Joe Watkins <krakjoe@php.net> Co-authored-by: Dmitry Stogov <dmitry@zend.com>
* Merge branch 'PHP-7.3'Christoph M. Becker2018-10-161-0/+6
|\ | | | | | | | | * PHP-7.3: Add support for getting SKIP_TAGSTART and SKIP_WHITE options
| * Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-10-161-0/+6
| |\ | | | | | | | | | | | | * PHP-7.2: Add support for getting SKIP_TAGSTART and SKIP_WHITE options
| | * Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-10-161-0/+6
| | |\ | | | | | | | | | | | | | | | | * PHP-7.1: Add support for getting SKIP_TAGSTART and SKIP_WHITE options
| | | * Add support for getting SKIP_TAGSTART and SKIP_WHITE optionsChristoph M. Becker2018-10-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `XML_OPTION_SKIP_TAGSTART` and `XML_OPTION_SKIP_WHITE` had been introduced[1], it had been overlooked to also support them for `xml_parser_get_option()`. We catch up on that. [1] <http://git.php.net/?p=php-src.git;a=commit;h=b57dc275950b228f2399990471c4f22b7d154c6c>
| | | * Trim trailing whitespace in source code filesPeter Kokot2018-10-131-45/+45
| | | |
| | * | Trim trailing whitespace in source code filesPeter Kokot2018-10-131-43/+43
| | | |
* | | | Merge branch 'PHP-7.3'Christoph M. Becker2018-10-091-1/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.3: Fix #30875: xml_parse_into_struct() does not resolve entities
| * | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-10-091-1/+0
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.2: Fix #30875: xml_parse_into_struct() does not resolve entities
| | * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-10-091-1/+0
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.1: Fix #30875: xml_parse_into_struct() does not resolve entities
| | | * Fix #30875: xml_parse_into_struct() does not resolve entitiesChristoph M. Becker2018-10-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting up an empty default handler is not only useless, but actually harmful, since internal entity-references are not resolved anymore. From the libexpat docs[1]: | Setting the handler with this call has the side effect of | turning off expansion of references to internally defined general | entities. Instead these references are passed to the default | handler. [1] <https://www.xml.com/pub/1999/09/expat/reference.html#setdefhandler>
| | | * year++Xinchen Hui2018-01-021-1/+1
| | | |
| | | * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | | |
| | * | year++Xinchen Hui2018-01-021-1/+1
| | | |
* | | | Remove PHP_XML_INTERNAL definesNikita Popov2018-09-171-1/+0
| | | | | | | | | | | | | | | | This macro is no longer used.
* | | | Remove IS_EXT_MODULE definesNikita Popov2018-09-161-2/+0
| | | | | | | | | | | | | | | | | | | | I'm not sure what this was used for, but it doesn't look to be relevant anymore.
* | | | Make ext/xml API privateNikita Popov2018-09-161-65/+93
|/ / / | | | | | | | | | Also remove dead functions
* | | Remove unused Git attributes identPeter Kokot2018-07-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* | | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-7/+7
| | | | | | | | | | | | where we sure about string persistence.
* | | Reduce variable scopeAnatol Belski2018-02-171-2/+1
| | |
* | | Trailing whitespacesGabriel Caruso2018-01-031-43/+43
| | | | | | | | | | | | Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
* | | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | Move constants into read-only data segmentDmitry Stogov2017-12-141-6/+6
| | |
* | | Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
| | |
* | | Cleanup type conversionDmitry Stogov2017-12-071-6/+3
| | |
* | | Kill compiler warnings in ext/xmlKalle Sommer Nielsen2017-08-241-1/+1
|/ /
* | Update copyright headers to 2017Sammy Kaye Powers2017-01-021-2/+2
| |
* | Merge branch 'PHP-7.1'Anatol Belski2016-11-221-1/+1
|\ \ | |/ | | | | | | * PHP-7.1: remove TSRMLS_*
| * Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2016-11-221-1/+1
| |\ | | | | | | | | | | | | * PHP-7.0: remove TSRMLS_*
| | * remove TSRMLS_*Anatol Belski2016-11-211-1/+1
| | |
* | | Move utf8_encode and utf8_decode to ext/standardAndrea Faulds2016-10-171-50/+0
|/ /
* | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2016-08-201-2/+2
|\ \ | |/
| * Merge branch 'PHP-5.6' into PHP-7.0Christoph M. Becker2016-08-201-2/+2
| |\
| | * Improvements to fix #72714, suggested by nikicChristoph M. Becker2016-08-201-2/+2
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2016-08-201-6/+14
|\ \ \ | |/ /
| * | Merge branch 'PHP-5.6' into PHP-7.0Christoph M. Becker2016-08-201-6/+14
| |\ \ | | |/
| | * Fix #72714: _xml_startElementHandler() segmentation faultChristoph M. Becker2016-08-201-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Unused varXinchen Hui2016-08-171-1/+0
| | |
* | | Merge branch 'PHP-7.0' into PHP-7.1Christoph M. Becker2016-08-171-1/+2
|\ \ \ | |/ /
| * | Merge branch 'PHP-5.6' into PHP-7.0Christoph M. Becker2016-08-171-1/+2
| |\ \ | | |/
| | * #72085: SEGV on unknown address zif_xml_parseChristoph M. Becker2016-08-171-1/+2
| | | | | | | | | | | | | | | We better make sure that the ZVALs we're accessing as arrays are indeed arrays.
| * | fix #72206 (xml_parser_create/xml_parser_free leaks mem)Joe Watkins2016-05-141-3/+4
| | |
| * | Merge branch 'PHP-5.6' into PHP-7.0Anatol Belski2016-04-271-30/+30
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: 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
| | * Merge branch 'PHP-5.5' into PHP-5.6Stanislav Malyshev2016-04-261-53/+53
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| | | * Fix bug #72099: xml_parse_into_struct segmentation faultStanislav Malyshev2016-04-261-53/+53
| | | |
| | | * Bump yearXinchen Hui2015-01-151-1/+1
| | | |