From 1fbc7c04bf9d3021b6eb6595d79dfbcbfbbc2b0e Mon Sep 17 00:00:00 2001 From: n0pw Date: Sun, 18 Jan 2026 18:38:17 +0100 Subject: [PATCH] Migration: fix legacy deserialization (#2674) --- crates/migration/src/email_v1.rs | 2 +- crates/migration/src/object.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/migration/src/email_v1.rs b/crates/migration/src/email_v1.rs index 0f4b8ccd..2fb3378c 100644 --- a/crates/migration/src/email_v1.rs +++ b/crates/migration/src/email_v1.rs @@ -519,7 +519,7 @@ fn deserialize_keyword(bytes: &mut std::slice::Iter<'_, u8>) -> Option Some(LegacyKeyword::Forwarded), MDN_SENT => Some(LegacyKeyword::MdnSent), other => { - let len = other - OTHER; + let len = other - 12; let mut keyword = Vec::with_capacity(len); for _ in 0..len { keyword.push(*bytes.next()?); diff --git a/crates/migration/src/object.rs b/crates/migration/src/object.rs index 2f820e7d..832dfe7b 100644 --- a/crates/migration/src/object.rs +++ b/crates/migration/src/object.rs @@ -327,7 +327,7 @@ impl DeserializeFrom for Keyword { FORWARDED => Some(Keyword::Forwarded), MDN_SENT => Some(Keyword::MdnSent), other => { - let len = other - OTHER; + let len = other - 12; let mut keyword = Vec::with_capacity(len); for _ in 0..len { keyword.push(*bytes.next()?);