diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-05 02:44:02 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-05 02:44:02 +0000 |
commit | ec0a915fc34a21d95357cd580c8458df629ff564 (patch) | |
tree | 75f032e079b05caf8e87878d382055f53324811a /src/reader/parser/inside_comment.rs | |
parent | 69640b263330e18465e85e074cbd9792c59b8bdc (diff) | |
parent | 6f95508c081d35323b17f0b3c1b5373099824b0b (diff) | |
download | xml-rs-android14-qpr2-s3-release.tar.gz |
Snap for 11175020 from 6f95508c081d35323b17f0b3c1b5373099824b0b to 24Q1-releaseandroid-14.0.0_r37android-14.0.0_r36android-14.0.0_r35android-14.0.0_r34android-14.0.0_r33android-14.0.0_r32android-14.0.0_r31android-14.0.0_r30android-14.0.0_r29android14-qpr2-s5-releaseandroid14-qpr2-s4-releaseandroid14-qpr2-s3-releaseandroid14-qpr2-s2-releaseandroid14-qpr2-s1-releaseandroid14-qpr2-release
Change-Id: I57bca9a739aadb6553ae8cb371a74040eaaa02d4
Diffstat (limited to 'src/reader/parser/inside_comment.rs')
-rw-r--r-- | src/reader/parser/inside_comment.rs | 3 |
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 } |