aboutsummaryrefslogtreecommitdiff
path: root/src/reader/parser/inside_comment.rs
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-05 02:44:02 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-05 02:44:02 +0000
commitec0a915fc34a21d95357cd580c8458df629ff564 (patch)
tree75f032e079b05caf8e87878d382055f53324811a /src/reader/parser/inside_comment.rs
parent69640b263330e18465e85e074cbd9792c59b8bdc (diff)
parent6f95508c081d35323b17f0b3c1b5373099824b0b (diff)
downloadxml-rs-android14-qpr2-s3-release.tar.gz
Change-Id: I57bca9a739aadb6553ae8cb371a74040eaaa02d4
Diffstat (limited to 'src/reader/parser/inside_comment.rs')
-rw-r--r--src/reader/parser/inside_comment.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/reader/parser/inside_comment.rs b/src/reader/parser/inside_comment.rs
index e4132c5..240ee20 100644
--- a/src/reader/parser/inside_comment.rs
+++ b/src/reader/parser/inside_comment.rs
@@ -23,6 +23,9 @@ impl PullParser {
_ if self.config.c.ignore_comments => None, // Do not modify buffer if ignoring the comment
_ => {
+ if self.buf.len() > self.config.max_data_length {
+ return Some(self.error(SyntaxError::ExceededConfiguredLimit));
+ }
t.push_to_string(&mut self.buf);
None
}