melib/imap: prevent panic in untagged fetch response

master
Manos Pitsidianakis 2020-09-11 00:06:32 +03:00
parent bda5bd963a
commit 927a0c3cc0
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 6 additions and 2 deletions

View File

@ -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