mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 23:06:32 +03:00
fix(imap): body ptr lifetime
This commit is contained in:
committed by
holger krekel
parent
245abb8384
commit
618087e5a7
@@ -1007,11 +1007,12 @@ impl Imap {
|
|||||||
let flags = if is_seen { DC_IMAP_SEEN } else { 0 };
|
let flags = if is_seen { DC_IMAP_SEEN } else { 0 };
|
||||||
|
|
||||||
if !is_deleted && msg.body().is_some() {
|
if !is_deleted && msg.body().is_some() {
|
||||||
|
let body = msg.body().unwrap();
|
||||||
unsafe {
|
unsafe {
|
||||||
(self.receive_imf)(
|
(self.receive_imf)(
|
||||||
context,
|
context,
|
||||||
msg.body().unwrap().as_ptr() as *const libc::c_char,
|
body.as_ptr() as *const libc::c_char,
|
||||||
msg.body().unwrap().len(),
|
body.len(),
|
||||||
folder.as_ref(),
|
folder.as_ref(),
|
||||||
server_uid,
|
server_uid,
|
||||||
flags as u32,
|
flags as u32,
|
||||||
|
|||||||
Reference in New Issue
Block a user