mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
malloc-fail: Check for NULL pointer in xmlSaveNotation*
This commit is contained in:
@@ -2171,12 +2171,16 @@ xmlSaveTree(xmlSaveCtxtPtr ctxt, xmlNodePtr cur)
|
|||||||
|
|
||||||
int
|
int
|
||||||
xmlSaveNotationDecl(xmlSaveCtxtPtr ctxt, xmlNotationPtr cur) {
|
xmlSaveNotationDecl(xmlSaveCtxtPtr ctxt, xmlNotationPtr cur) {
|
||||||
|
if (ctxt == NULL)
|
||||||
|
return(-1);
|
||||||
xmlBufDumpNotationDecl(ctxt->buf, cur);
|
xmlBufDumpNotationDecl(ctxt->buf, cur);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
xmlSaveNotationTable(xmlSaveCtxtPtr ctxt, xmlNotationTablePtr cur) {
|
xmlSaveNotationTable(xmlSaveCtxtPtr ctxt, xmlNotationTablePtr cur) {
|
||||||
|
if (ctxt == NULL)
|
||||||
|
return(-1);
|
||||||
xmlBufDumpNotationTable(ctxt->buf, cur);
|
xmlBufDumpNotationTable(ctxt->buf, cur);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user