public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Remi Collet <remi@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/php] private-php86: add upstream patch for https://bugs.php.net/81325 segfault in simplexml
Date: Fri, 27 Nov 2026 07:31:30 GMT [thread overview]
Message-ID: <179576469039.1.4507099003753885021.rpms-php-ed96d1d7164e@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/php
Branch : private-php86
Commit : ed96d1d7164e54d7bc095f20a80d2de510f83b76
Author : Remi Collet <remi@fedoraproject.org>
Date : 2021-08-03T13:50:11+02:00
Stats : +55/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/php/c/ed96d1d7164e54d7bc095f20a80d2de510f83b76?branch=private-php86
Log:
add upstream patch for https://bugs.php.net/81325 segfault in simplexml
---
diff --git a/php-simplexml.patch b/php-simplexml.patch
new file mode 100644
index 0000000..d444aa5
--- /dev/null
+++ b/php-simplexml.patch
@@ -0,0 +1,49 @@
+From 112527d67798b6e18ed1c639e66d8cff674dcfd8 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Tue, 3 Aug 2021 12:06:36 +0200
+Subject: [PATCH] Fix bug #81325 Segfault in zif_simplexml_import_dom
+
+---
+ ext/simplexml/simplexml.c | 2 +-
+ ext/simplexml/tests/bug81325.phpt | 19 +++++++++++++++++++
+ 2 files changed, 20 insertions(+), 1 deletion(-)
+ create mode 100644 ext/simplexml/tests/bug81325.phpt
+
+diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
+index 4ed41d758762..21e1190e681b 100644
+--- a/ext/simplexml/simplexml.c
++++ b/ext/simplexml/simplexml.c
+@@ -2635,7 +2635,7 @@ PHP_FUNCTION(simplexml_import_dom)
+ nodep = xmlDocGetRootElement((xmlDocPtr) nodep);
+ }
+
+- if (nodep->type == XML_ELEMENT_NODE) {
++ if (nodep && nodep->type == XML_ELEMENT_NODE) {
+ if (!ce) {
+ ce = sxe_class_entry;
+ fptr_count = NULL;
+diff --git a/ext/simplexml/tests/bug81325.phpt b/ext/simplexml/tests/bug81325.phpt
+new file mode 100644
+index 000000000000..b4010dd1f0c3
+--- /dev/null
++++ b/ext/simplexml/tests/bug81325.phpt
+@@ -0,0 +1,19 @@
++--TEST--
++BUg #81325 (segfault in zif_simplexml_import_dom)
++--SKIPIF--
++<?php
++if (!extension_loaded('simplexml')) die('skip simplexml not available');
++if (!extension_loaded('dom')) die('skip simplexml not available');
++?>
++--FILE--
++<?php
++$dom = new DOMDocument;
++$dom->loadXML("foo");
++$xml = simplexml_import_dom($dom);
++?>
++Done
++--EXPECTF--
++Warning: DOMDocument::loadXML(): Start tag expected%s
++
++Warning: simplexml_import_dom(): Invalid Nodetype%s
++Done
diff --git a/php.spec b/php.spec
index 2f9e6f4..9bcba94 100644
--- a/php.spec
+++ b/php.spec
@@ -68,7 +68,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: php
Version: %{upver}%{?rcver:~%{rcver}}
-Release: 1%{?dist}
+Release: 2%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -120,6 +120,7 @@ Patch45: php-7.4.0-ldap_r.patch
Patch47: php-8.0.0-phpinfo.patch
# Upstream fixes (100+)
+Patch100: php-simplexml.patch
# Security fixes (200+)
@@ -716,6 +717,7 @@ in pure PHP.
%patch47 -p1 -b .phpinfo
# upstream patches
+%patch100 -p1 -b .segfault
# security patches
@@ -1527,6 +1529,9 @@ systemctl try-restart php-fpm.service >/dev/null 2>&1 || :
%changelog
+* Tue Aug 3 2021 Remi Collet <remi@remirepo.net> - 8.0.9-2
+- add upstream patch for https://bugs.php.net/81325 segfault in simplexml
+
* Thu Jul 29 2021 Remi Collet <remi@remirepo.net> - 8.0.9-1
- Update to 8.0.9 - http://www.php.net/releases/8_0_9.php
reply other threads:[~2026-11-27 7:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179576469039.1.4507099003753885021.rpms-php-ed96d1d7164e@fedoraproject.org \
--to=remi@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox