mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 23:06:32 +03:00
dc_mimeparser_parse: accept input as slice, not as pointer + length
This commit is contained in:
committed by
Floris Bruynooghe
parent
d3048aa06f
commit
21976b14a6
@@ -57,7 +57,8 @@ pub unsafe fn dc_receive_imf(
|
||||
// somewhen, I did not found out anything that speaks against this approach yet)
|
||||
|
||||
let mut mime_parser = dc_mimeparser_new(context);
|
||||
dc_mimeparser_parse(&mut mime_parser, imf_raw_not_terminated, imf_raw_bytes);
|
||||
let body = std::slice::from_raw_parts(imf_raw_not_terminated as *const u8, imf_raw_bytes);
|
||||
dc_mimeparser_parse(&mut mime_parser, body);
|
||||
|
||||
if mime_parser.header.is_empty() {
|
||||
// Error - even adding an empty record won't help as we do not know the message ID
|
||||
|
||||
Reference in New Issue
Block a user