summaryrefslogtreecommitdiffstats
path: root/parser/htmlparser/nsExpatDriver.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-12-12 17:00:08 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-12-12 17:00:08 +0100
commitdacb3da00bd17e69f1a8f1080668808a5f3fe431 (patch)
tree46a188f6a02a032bdeff129c0c155c597649e4d9 /parser/htmlparser/nsExpatDriver.h
parentd2a1d638b57b5431280a45a8b48519a59e5a55a5 (diff)
downloadUXP-dacb3da00bd17e69f1a8f1080668808a5f3fe431.tar
UXP-dacb3da00bd17e69f1a8f1080668808a5f3fe431.tar.gz
UXP-dacb3da00bd17e69f1a8f1080668808a5f3fe431.tar.lz
UXP-dacb3da00bd17e69f1a8f1080668808a5f3fe431.tar.xz
UXP-dacb3da00bd17e69f1a8f1080668808a5f3fe431.zip
Issue #1317 - Increase the XML nested depth limit to 2048.
- Converts from macro to static const for the limit. - Uses a check against the declared type for the counter instead of a hard-coded one. This resolves #1317.
Diffstat (limited to 'parser/htmlparser/nsExpatDriver.h')
-rw-r--r--parser/htmlparser/nsExpatDriver.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/parser/htmlparser/nsExpatDriver.h b/parser/htmlparser/nsExpatDriver.h
index 0d62bd09d..988409cfe 100644
--- a/parser/htmlparser/nsExpatDriver.h
+++ b/parser/htmlparser/nsExpatDriver.h
@@ -16,9 +16,6 @@
#include "nsIParser.h"
#include "nsCycleCollectionParticipant.h"
-// Tree depth limit for XML-based files (xml/svg/etc.)
-#define MAX_XML_TREE_DEPTH 200
-
class nsIExpatSink;
class nsIExtendedExpatSink;
struct nsCatalogData;
@@ -123,13 +120,14 @@ private:
// Necko
bool mIsFinalChunk;
- uint8_t mTagDepth;
+ // The depth of nested parsing we are currently at
+ uint16_t mTagDepth;
nsresult mInternalState;
// The length of the data in Expat's buffer (in number of PRUnichars).
uint32_t mExpatBuffered;
-
+
// These sinks all refer the same conceptual object. mOriginalSink is
// identical with the nsIContentSink* passed to WillBuildModel, and exists
// only to avoid QI-ing back to nsIContentSink*.