History log of /php-src/ext/simplexml/simplexml.c (Results 1 – 25 of 544)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# b5834c12 11-Sep-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-15837: Segmentation fault in ext/simplexml/simplexml.c

We should check if the iterator data is still valid, because if it
isn't, then the type info is UNDEF, but the pointer value

Fix GH-15837: Segmentation fault in ext/simplexml/simplexml.c

We should check if the iterator data is still valid, because if it
isn't, then the type info is UNDEF, but the pointer value may be
dangling.

Closes GH-15841.

show more ...


# 51d93c19 27-Aug-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Remove failure paths for infallible code in simplexml

For IS_STRING, sxe_object_cast_ex() will call cast_object() which cannot
fail for IS_STRING.


# 9979f474 27-Aug-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Remove unused parameter from match_ns()


# 2fe8dd10 27-Aug-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Remove unused parameter of php_sxe_reset_iterator()


# 7f37c22d 27-Aug-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Cleanup php_sxe_count_elements_helper()


# 9b73d591 27-Aug-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Avoid string duplication if possible in SimpleXMLElement::addAttribute() (#15606)


# 5853cdb7 20-Aug-2024 Gina Peter Bnayard

Use "must not" instead of "cannot" wording


# e7c4d54d 18-Aug-2024 Gina Peter Bnayard

Use new helper function for "cannot be empty" ValueErrors


# 746b1cf4 08-Aug-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Access long value directly for call to count() in simplexml (#15278)

Because the signature is checked at compile time, we know that the only
possible return value (if there is no excepti

Access long value directly for call to count() in simplexml (#15278)

Because the signature is checked at compile time, we know that the only
possible return value (if there is no exception) is IS_LONG. So we can
avoid some work.

show more ...


# cf14adf8 27-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Avoid string duplications in simplexml (#15122)

Switch to zend_string which allows us to use zend_string_copy.


# 477c2afb 06-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix typo in simplexml.c


# acda7ed5 06-Jul-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Stop using reserved names in simplexml


# 2edf12e8 23-Jun-2024 David Carlier

Fix GH-14638: null dereference after XML parsing failure.

object document is null if the parsing had failed prior to cast to
string.


# 11accb5c 25-Jun-2024 Arnaud Le Blanc

Preferably include from build dir (#13516)

* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Preferably include from build dir (#13516)

* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Before, out of tree builds would preferably include files from the src dir, as
the include path was defined as follows (ignoring includes from ext/ and sapi/) :

-I$(top_builddir)/main
-I$(top_srcdir)
-I$(top_builddir)/TSRM
-I$(top_builddir)/Zend
-I$(top_srcdir)/main
-I$(top_srcdir)/Zend
-I$(top_srcdir)/TSRM
-I$(top_builddir)/

As a result, an out of tree build would include configure artifacts such as
`main/php_config.h` from the src dir.

After this change, the include path is defined as follows:

-I$(top_builddir)/main
-I$(top_builddir)
-I$(top_srcdir)/main
-I$(top_srcdir)
-I$(top_builddir)/TSRM
-I$(top_builddir)/Zend
-I$(top_srcdir)/Zend
-I$(top_srcdir)/TSRM

* Fix extension include path for out of tree builds

* Include config.h with the brackets form

`#include "config.h"` searches in the directory containing the including-file
before any other include path. This can include the wrong config.h when building
out of tree and a config.h exists in the source tree.

Using `#include <config.h>` uses exclusively the include path, and gives
priority to the build dir.

show more ...


# fd2d8696 08-Jun-2024 Gina Peter Banyard

Clean-up some more headers (#14416)

Remove unused headers (such as php_ini.h for extensions that don't define INI settings)
Use more specific headers when possible


# dfde0d4c 10-May-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Handle dumping node to file


# 0c490ade 10-May-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Handle dumping document to file


# 44485892 10-May-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Factor out all common code for XML serialization and merge common paths


# 8637a3f5 04-May-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix getDocNamespaces() not working when only having xmlns attributes without an internal declaration in the document


# 4bd63568 18-Jan-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix argument type of simplexml_import_dom (#13170)

It needs to be "object".
This is because first- and third-party extension can register custom
node types using `php_libxml_register

Fix argument type of simplexml_import_dom (#13170)

It needs to be "object".
This is because first- and third-party extension can register custom
node types using `php_libxml_register_export`. So we don't know upfront
what types can be expected.

This also changes the error to a TypeError everywhere.

show more ...


# 97267215 10-Jan-2024 David CARLIER

general signatures discrepencies fixes (#13122)


# f75931ad 12-Dec-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-12929: SimpleXMLElement with stream_wrapper_register can segfault

Move SimpleXML invalidation code after node checks

This is safe, i.e. the tree hasn't been modified yet, bec

Fix GH-12929: SimpleXMLElement with stream_wrapper_register can segfault

Move SimpleXML invalidation code after node checks

This is safe, i.e. the tree hasn't been modified yet, because either we
didn't call a libxml modification function yet, or xmlNewChild is called
with a NULL pointer, which makes it bail out and return NULL.

Closes GH-12947.

show more ...


# abf4c116 12-Dec-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix getting the address of an uninitialized property of a SimpleXMLElement resulting in a crash

Closes GH-12945.


# b842ea4f 28-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Apply SimpleXML iterator fixes only on master

Many methods in SimpleXML reset the iterator when called. This has the
consequence that mixing these operations with loops can cause infinit

Apply SimpleXML iterator fixes only on master

Many methods in SimpleXML reset the iterator when called. This has the
consequence that mixing these operations with loops can cause infinite
loops, or the loss of iteration data.
Some people may however rely on the resetting behaviour. To prevent
unintended breaks in stable branches, let's only apply the fix to master.

This reverts GH-12193, GH-12229, GG-12247 for stable branches while
keeping them on master, adding a note in UPGRADING as well.

show more ...


# 82a84d0b 23-Sep-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-12167 and GH-12169: Unable to get comment or processing instruction contents in SimpleXML

Closes GH-12289.


12345678910>>...22