mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Add fuzzy-test for dc_mimeparser_parser
This commit is contained in:
committed by
holger krekel
parent
7b73103133
commit
a773b7929c
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user