Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Unified Diff: third_party/libxml/src/include/libxml/entities.h

Issue 2539003002: Make the XML entity recursion check more precise. (Closed)
Patch Set: Feedback. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libxml/src/entities.c ('k') | third_party/libxml/src/parser.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libxml/src/include/libxml/entities.h
diff --git a/third_party/libxml/src/include/libxml/entities.h b/third_party/libxml/src/include/libxml/entities.h
index 47b4573eba656f2bef00ea4b4e9a3d8613101636..012efab294cbaaf04736da0fefd6343c843abb88 100644
--- a/third_party/libxml/src/include/libxml/entities.h
+++ b/third_party/libxml/src/include/libxml/entities.h
@@ -35,8 +35,13 @@ typedef enum {
* and the linkind data needed for the linking in the hash table.
*/
+typedef enum {
+ XML_ENTITY_NOT_BEING_CHECKED,
+ XML_ENTITY_BEING_CHECKED /* entity check is in progress */
+} xmlEntityRecursionGuard;
+
struct _xmlEntity {
- void *_private; /* application data */
+ void *_private; /* application data */
xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
const xmlChar *name; /* Entity name */
struct _xmlNode *children; /* First child link */
@@ -56,10 +61,11 @@ struct _xmlEntity {
struct _xmlEntity *nexte; /* unused */
const xmlChar *URI; /* the full URI as computed */
int owner; /* does the entity own the childrens */
- int checked; /* was the entity content checked */
- /* this is also used to count entities
- * references done from that entity
- * and if it contains '<' */
+ int checked; /* was the entity content checked and */
+ /* l.o. bit: replacement contains '<' */
+ /* remaining bits: one plus count of */
+ /* entity references from this entity */
+ xmlEntityRecursionGuard guard;
};
/*
« no previous file with comments | « third_party/libxml/src/entities.c ('k') | third_party/libxml/src/parser.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698