Skip to content

Commit 324172f

Browse files
author
Jayce Fayne
committed
increase limit
1 parent b3f67b0 commit 324172f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ impl<'a> Iterator for PartsIterator<'a> {
925925
/// assert_eq!(dateparse(parsed.headers.get_first_value("Date").unwrap().as_str()).unwrap(), 1475417182);
926926
/// ```
927927
pub fn parse_mail(raw_data: &[u8]) -> Result<ParsedMail<'_>, MailParseError> {
928-
parse_mail_recursive(raw_data, false, u8::MAX)
928+
parse_mail_recursive(raw_data, false, 2000)
929929
}
930930

931931
/// Strips LF or CRLF if there is one at the end of the string raw_data[ix_start..ix].
@@ -945,7 +945,7 @@ fn strip_trailing_crlf(raw_data: &[u8], ix_start: usize, mut ix: usize) -> usize
945945
fn parse_mail_recursive(
946946
raw_data: &[u8],
947947
in_multipart_digest: bool,
948-
depth: u8,
948+
depth: u16,
949949
) -> Result<ParsedMail<'_>, MailParseError> {
950950
let (headers, ix_body) = parse_headers(raw_data)?;
951951
let ctype = headers

0 commit comments

Comments
 (0)