1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

check for NULL to prevent crash with meta elements

* xmlsave.c: check for NULL to prevent crash with meta elements
This commit is contained in:
Rob Richards
2005-09-03 14:56:36 +00:00
parent e40afecb89
commit 07b7200775
2 changed files with 9 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
Sat Sep 3 16:51:55 CEST 2005 Rob Richards <rrichards@ctindustries.net>
* xmlsave.c: check for NULL to prevent crash with meta elements
Sat Sep 3 16:26:55 CEST 2005 Daniel Veillard <daniel@veillard.com>
* relaxng.c: structured error reporting problem with Relax-NG

View File

@@ -1216,11 +1216,13 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
xmlChar *httpequiv;
httpequiv = xmlGetProp(tmp, BAD_CAST"http-equiv");
if (xmlStrcasecmp(httpequiv, BAD_CAST"Content-Type") == 0) {
if (httpequiv != NULL) {
if (xmlStrcasecmp(httpequiv, BAD_CAST"Content-Type") == 0) {
xmlFree(httpequiv);
break;
}
xmlFree(httpequiv);
break;
}
xmlFree(httpequiv);
}
tmp = tmp->next;
}