-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Invalid memory access with libxml2 2.9.9 #7476
Comments
The error also reproduces in a plain C implementation of the spec: #include <stdio.h>
#include <libxml/xmlreader.h>
int main(int argc, char **argv) {
xmlTextReaderPtr reader;
reader = xmlReaderForMemory("<root>\n<child/>\n</root>\n", 23, NULL, NULL, 0);
printf("%s", xmlTextReaderReadOuterXml(reader));
xmlTextReaderRead(reader);
printf("%s", xmlTextReaderReadOuterXml(reader));
} So either we're using the API wrong or this is a libxml2 issue. The only change to |
I filed an issue with libxml2: https://gitlab.gnome.org/GNOME/libxml2/issues/43 |
It looks like a bug on their side. However, on our side we can probably check the node type before invoking that C function. I think the outer XML is only available on some node types. I might give it a shot. |
The stdlib XML specs fail with the following error when linked against libxml2 2.9.9:
Tested on Alpine edge with Crystal 0.27.2
With 2.9.8. everything seems to work fine. LibXML2 changelog: https://gitlab.gnome.org/GNOME/libxml2/blob/a7fe7ee45938c53a8dd028dd40baa461191a2fd2/NEWS
This issue was first reported by mps on Gitter and I've been able to reproduce it.
The text was updated successfully, but these errors were encountered: