diff options
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 } |