diff options
author | Mike Hommey <glandium@debian.org> | 2008-11-15 11:35:56 +0100 |
---|---|---|
committer | Mike Hommey <glandium@debian.org> | 2008-11-15 14:58:48 +0100 |
commit | 31b414a855b6b38a520db67077a7ff5871bf8057 (patch) | |
tree | 9dfdc3e52fcc4204efe514573b3acbc747966a89 | |
parent | a9d123d9fbbf81d7f611f4ac5ac7ff93c7c2b97e (diff) | |
download | libxml2-31b414a855b6b38a520db67077a7ff5871bf8057.tar.gz |
Avoid double-free in some situations
parserInternals.c: apply patch from upstream revision 3741 to avoid
double-free in some situations. This fixes a crash while running the
W3C/OASIS XML conformance test.
-rw-r--r-- | debian/changelog | 8 | ||||
-rw-r--r-- | parserInternals.c | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 76aa791..6218ea6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +libxml2 (2.6.27.dfsg-6) UNRELEASED; urgency=low + + * parserInternals.c: apply patch from upstream revision 3741 to avoid + double-free in some situations. This fixes a crash while running the + W3C/OASIS XML conformance test. + + -- Mike Hommey <glandium@debian.org> Sat, 15 Nov 2008 11:47:58 +0100 + libxml2 (2.6.27.dfsg-5) stable-security; urgency=low * Fix regressions due to previous security fixes. Fixes: CVE-2008-3529. diff --git a/parserInternals.c b/parserInternals.c index 5aeb37d..a8111af 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -1399,7 +1399,8 @@ xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) { if (input == NULL) { return(NULL); } - input->filename = (char *) entity->URI; + if (entity->URI != NULL) + input->filename = (char *) xmlStrdup((xmlChar *) entity->URI); input->base = entity->content; input->cur = entity->content; input->length = entity->length; |