mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
fixed a serious problem when substituing entities using the Reader, the
* parser.c xmlreader.c include/libxml/parser.h: fixed a serious problem when substituing entities using the Reader, the entities content might be freed and if rereferenced would crash * Makefile.am test/* result/*: added a new test case and a new test operation for the reader with substitution of entities. Daniel
This commit is contained in:
@@ -155,6 +155,20 @@ typedef enum {
|
||||
*/
|
||||
#define XML_SKIP_IDS 8
|
||||
|
||||
/**
|
||||
* xmlParserMode:
|
||||
*
|
||||
* A parser can operate in various modes
|
||||
*/
|
||||
typedef enum {
|
||||
XML_PARSE_UNKNOWN = 0,
|
||||
XML_PARSE_DOM = 1,
|
||||
XML_PARSE_SAX = 2,
|
||||
XML_PARSE_PUSH_DOM = 3,
|
||||
XML_PARSE_PUSH_SAX = 4,
|
||||
XML_PARSE_READER = 5
|
||||
} xmlParserMode;
|
||||
|
||||
/**
|
||||
* xmlParserCtxt:
|
||||
*
|
||||
@@ -240,7 +254,7 @@ struct _xmlParserCtxt {
|
||||
|
||||
int loadsubset; /* should the external subset be loaded */
|
||||
int linenumbers; /* set line number in element content */
|
||||
void *catalogs; /* document's own catalog */
|
||||
void *catalogs; /* document's own catalog */
|
||||
int recovery; /* run in recovery mode */
|
||||
int progressive; /* is this a progressive parsing */
|
||||
xmlDictPtr dict; /* dictionnary for the parser */
|
||||
@@ -282,6 +296,7 @@ struct _xmlParserCtxt {
|
||||
* the complete error informations for the last error.
|
||||
*/
|
||||
xmlError lastError;
|
||||
xmlParserMode parseMode; /* the parser mode */
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user