-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-10.0
-
Yes
-
Low
-
rhel-jotnar
-
None
-
False
-
False
-
-
None
-
None
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
-
All
-
None
What were you trying to do that didn't work?
An issue has been reported when using omreport (a Dell tool from srvadmin suite) which relies on libxml2 for XML parsing.
omreport works fine on RHEL 9 but fails on RHEL 10 with the error "parser error : Extra content at the end of the document".
What is the impact of this issue to you?
It is currently not possible to use the omreport tool from Dell on RHEL 10.
Please provide the package NVR for which the bug is seen:
libxml2-2.12.5-9.el10_0.x86_64
How reproducible is this bug?:
It is reproducible with example code available upstream:
https://gitlab.gnome.org/GNOME/libxml2/-/issues/865
The issue below is also reproducible but I'm not 100% sure that it's the same problem:
https://gitlab.gnome.org/GNOME/libxml2/-/issues/638
Steps to reproduce
$ cat test_xml_parse.c
#include <stdio.h>
#include <string.h>
#include <libxml/parser.h>
int main() {
// XML buffer with a terminating null character
const char *xmlBuffer = "<root><child>Test</child></root>\0";
int bufferSize = (int)strlen(xmlBuffer) + 1; // Include the terminating null
// Initialize libxml
xmlInitParser();
// Parse the buffer
xmlDocPtr doc = xmlParseMemory(xmlBuffer, bufferSize);
// Check if parsing succeeded
if (doc == NULL)
else
{ printf("Parsing succeeded: libxml2 handled the terminating null character.\n"); xmlFreeDoc(doc); } // Cleanup
xmlCleanupParser();
return 0;
}
$ gcc -Wall test_xml_parse.c -o test_xml_parse -I/usr/include/libxml2/ -lxml2
$ ./test_xml_parse
Entity: line 1: parser error : Extra content at the end of the document
<root><child>Test</child></root>
^
Parsing failed: libxml2 could not handle the terminating null character.
Expected results
On RHEL 9 with the example code above we get:
$ ./test_xml_parse
Parsing succeeded: libxml2 handled the terminating null character.
Actual results
On RHEL10 we get the following result:
$ ./test_xml_parse
Entity: line 1: parser error : Extra content at the end of the document
<root><child>Test</child></root>