-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Segmentation fault (access null pointer) in ext/dom/parentnode/tree.c #16039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Minimal reproduction: <?php
$dom = new DOMDocument;
$element = $dom->appendChild($dom->createElement('root'));
$str = str_repeat('X', 2**31 + 10);
try {
$element->append('x', $str);
} catch (ValueError $e) {
$element->prepend('x', new DOMEntity());
} |
Very old bug, must've been here since the beginning that DOMParentNode was here. |
nielsdos
added a commit
to nielsdos/php-src
that referenced
this issue
Sep 25, 2024
…parentnode/tree.c dom_object_get_node() can fail if we don't have a user object associated.
nielsdos
added a commit
to nielsdos/php-src
that referenced
this issue
Sep 25, 2024
…parentnode/tree.c dom_object_get_node() can fail if we don't have a user object associated. Closes phpGH-16056.
nielsdos
added a commit
that referenced
this issue
Sep 25, 2024
* PHP-8.2: Fix GH-16039: Segmentation fault (access null pointer) in ext/dom/parentnode/tree.c
nielsdos
added a commit
that referenced
this issue
Sep 25, 2024
* PHP-8.3: Fix GH-16039: Segmentation fault (access null pointer) in ext/dom/parentnode/tree.c
nielsdos
added a commit
that referenced
this issue
Sep 25, 2024
* PHP-8.4: Fix GH-16039: Segmentation fault (access null pointer) in ext/dom/parentnode/tree.c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The following code:
Resulted in this output:
To reproduce:
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04
The text was updated successfully, but these errors were encountered: