1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-26 00:37:43 +03:00

parser: Allow to set maximum amplification factor

This commit is contained in:
Nick Wellnhofer
2023-08-20 20:48:10 +02:00
parent 9d80a2b134
commit ed3bd05284
7 changed files with 151 additions and 34 deletions

View File

@@ -312,6 +312,7 @@ struct _xmlParserCtxt {
int endCheckState; /* quote state for push parser */
unsigned short nbErrors; /* number of errors */
unsigned short nbWarnings; /* number of warnings */
unsigned maxAmpl; /* maximum amplification factor */
};
/**
@@ -1149,6 +1150,9 @@ XMLPUBFUN int
XMLPUBFUN int
xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
int options);
XMLPUBFUN void
xmlCtxtSetMaxAmplification(xmlParserCtxtPtr ctxt,
unsigned maxAmpl);
XMLPUBFUN xmlDocPtr
xmlReadDoc (const xmlChar *cur,
const char *URL,