mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
malloc-fail: Check for malloc failure in xhtmlNodeDumpOutput
This commit is contained in:
parent
79ab721cb3
commit
ebbc31cc6b
@ -1714,10 +1714,14 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
|
|||||||
tmp = cur->children;
|
tmp = cur->children;
|
||||||
while (tmp != NULL) {
|
while (tmp != NULL) {
|
||||||
if (xmlStrEqual(tmp->name, BAD_CAST"meta")) {
|
if (xmlStrEqual(tmp->name, BAD_CAST"meta")) {
|
||||||
|
int res;
|
||||||
xmlChar *httpequiv;
|
xmlChar *httpequiv;
|
||||||
|
|
||||||
httpequiv = xmlGetProp(tmp, BAD_CAST"http-equiv");
|
res = xmlNodeGetAttrValue(tmp, BAD_CAST "http-equiv",
|
||||||
if (httpequiv != NULL) {
|
NULL, &httpequiv);
|
||||||
|
if (res < 0) {
|
||||||
|
xmlSaveErrMemory(buf);
|
||||||
|
} else if (res == 0) {
|
||||||
if (xmlStrcasecmp(httpequiv,
|
if (xmlStrcasecmp(httpequiv,
|
||||||
BAD_CAST"Content-Type") == 0) {
|
BAD_CAST"Content-Type") == 0) {
|
||||||
xmlFree(httpequiv);
|
xmlFree(httpequiv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user