Migration: fix legacy deserialization (#2674)

This commit is contained in:
n0pw
2026-01-18 18:38:17 +01:00
committed by GitHub
parent 6ac4db3a94
commit 1fbc7c04bf
2 changed files with 2 additions and 2 deletions

View File

@@ -519,7 +519,7 @@ fn deserialize_keyword(bytes: &mut std::slice::Iter<'_, u8>) -> Option<LegacyKey
FORWARDED => 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()?);

View File

@@ -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()?);