Browse Source

imap: fix out of bounds panic on receive EXPUNGE

Closes #82
jmap-eventsource
Manos Pitsidianakis 1 year ago
parent
commit
5d968b7c40
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 2
      melib/src/backends/imap/untagged.rs

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

@ -95,7 +95,7 @@ impl ImapConnection {
.unwrap()
.entry(mailbox_hash)
.or_default()
.remove(n.try_into().unwrap());
.remove(TryInto::<usize>::try_into(n).unwrap().saturating_sub(1));
debug!("expunge {}, UID = {}", n, deleted_uid);
let deleted_hash: crate::email::EnvelopeHash = match self
.uid_store

Loading…
Cancel
Save