Browse Source

melib/imap: prevent panic in untagged fetch response

master
Manos Pitsidianakis 2 years ago
parent
commit
927a0c3cc0
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 8
      melib/src/backends/imap/untagged.rs

8
melib/src/backends/imap/untagged.rs

@ -138,8 +138,6 @@ impl ImapConnection {
));
}
UntaggedResponse::Exists(n) => {
/* UID FETCH ALL UID, cross-ref, then FETCH difference headers
* */
debug!("exists {}", n);
try_fail!(
mailbox_hash,
@ -152,6 +150,9 @@ impl ImapConnection {
uid, flags, body, ..
} in v
{
if uid.is_none() || flags.is_none() || body.is_none() {
continue;
}
let uid = uid.unwrap();
if self
.uid_store
@ -260,6 +261,9 @@ impl ImapConnection {
uid, flags, body, ..
} in v
{
if uid.is_none() || flags.is_none() || body.is_none() {
continue;
}
let uid = uid.unwrap();
if !self
.uid_store

Loading…
Cancel
Save