diff --git a/src/dc_mimeparser.rs b/src/dc_mimeparser.rs index ad2952403..85befcf6e 100644 --- a/src/dc_mimeparser.rs +++ b/src/dc_mimeparser.rs @@ -1546,6 +1546,7 @@ pub unsafe fn mailimf_find_optional_field( mod tests { use super::*; use crate::test_utils::*; + use proptest::prelude::*; use std::ffi::CStr; #[test] @@ -1630,6 +1631,14 @@ mod tests { assert_eq!(mimeparser.parts.len(), 1); } + proptest! { + #[test] + fn test_dc_mailmime_parse_crash_fuzzy(data in "[!-~\t ]{2000,}") { + let context = dummy_context(); + unsafe { dc_mimeparser_parse(&context.ctx, data.as_bytes()) } + } + } + #[test] fn test_mimeparser_with_context() { unsafe {