1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-13 13:17:36 +03:00

valid: Check for NULL text content in xmlValidateOneElement

Shouldn't occur in parsed documents but you can create text nodes with
NULL content through the API.
This commit is contained in:
Nick Wellnhofer 2024-03-15 02:23:08 +01:00
parent af3d80b9a0
commit 3061b56a1e

View File

@ -5925,7 +5925,8 @@ child_ok:
*/
child = elem->children;
while (child != NULL) {
if (child->type == XML_TEXT_NODE) {
if ((child->type == XML_TEXT_NODE) &&
(child->content != NULL)) {
const xmlChar *content = child->content;
while (IS_BLANK_CH(*content))