fix(receive_imf): do not attempt to convert raw body to utf8

This commit is contained in:
dignifiedquire
2019-09-13 23:37:13 +02:00
committed by holger krekel
parent 00e929afac
commit b3bc5b2520

View File

@@ -689,13 +689,10 @@ unsafe fn add_parts(
part.bytes, part.bytes,
*hidden, *hidden,
if 0 != save_mime_headers { if 0 != save_mime_headers {
let body_string = std::str::from_utf8(std::slice::from_raw_parts( Some(std::slice::from_raw_parts(
imf_raw_not_terminated as *const u8, imf_raw_not_terminated as *const u8,
imf_raw_bytes, imf_raw_bytes,
)) ))
.unwrap();
Some(body_string)
} else { } else {
None None
}, },