mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-31 06:50:06 +03: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;
|
||||
while (tmp != NULL) {
|
||||
if (xmlStrEqual(tmp->name, BAD_CAST"meta")) {
|
||||
int res;
|
||||
xmlChar *httpequiv;
|
||||
|
||||
httpequiv = xmlGetProp(tmp, BAD_CAST"http-equiv");
|
||||
if (httpequiv != NULL) {
|
||||
res = xmlNodeGetAttrValue(tmp, BAD_CAST "http-equiv",
|
||||
NULL, &httpequiv);
|
||||
if (res < 0) {
|
||||
xmlSaveErrMemory(buf);
|
||||
} else if (res == 0) {
|
||||
if (xmlStrcasecmp(httpequiv,
|
||||
BAD_CAST"Content-Type") == 0) {
|
||||
xmlFree(httpequiv);
|
||||
|
Loading…
x
Reference in New Issue
Block a user