[php-src] PR #21888: ext/xsl: discard partially-constructed xmlNs on xmlStrdup failure
| From: | iliaal | Date: | Mon, 27 Apr 2026 13:45:33 +0000 |
| Subject: | [php-src] PR #21888: ext/xsl: discard partially-constructed xmlNs on xmlStrdup failure | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-35912@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/21888
Author: iliaal
If
xmlStrdup fails for either href or prefix in
xsl_add_ns_def, the partially-constructed xmlNs (NULL href,
or NULL prefix when one was expected) was linked into node->nsDef.
Subsequent libxml2 traversal of the namespace chain dereferenced those NULLs. Free the
xmlNs via xmlFreeNs and return without linking it.