Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit 8318b5a

Browse files
committed
parser: Fix NULL checks for output arguments
1 parent f227086 commit 8318b5a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

entities.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ xmlAddEntity(xmlDocPtr doc, int extSubset, const xmlChar *name, int type,
290290
dtd->last = (xmlNodePtr) ret;
291291
}
292292

293-
*out = ret;
293+
if (out != NULL)
294+
*out = ret;
294295
return(0);
295296
}
296297

parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12172,7 +12172,7 @@ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctxt, const xmlChar *URL,
1217212172
xmlCtxtInitializeLate(ctxt);
1217312173

1217412174
list = xmlCtxtParseContent(ctxt, input, /* hasTextDecl */ 1, 1);
12175-
if (*listOut != NULL)
12175+
if (listOut != NULL)
1217612176
*listOut = list;
1217712177
else
1217812178
xmlFreeNodeList(list);

0 commit comments

Comments
 (0)