diff --git a/lib/lpc55-rot-startup/src/handoff.rs b/lib/lpc55-rot-startup/src/handoff.rs index 020937d6e..f71e33e01 100644 --- a/lib/lpc55-rot-startup/src/handoff.rs +++ b/lib/lpc55-rot-startup/src/handoff.rs @@ -56,6 +56,11 @@ impl<'a> Handoff<'a> { .expect("handoff store header"); // Serialize the data - n + hubpack::serialize(&mut dst[n..], t).expect("handoff store value") + let n = n + hubpack::serialize(&mut dst[n..], t) + .expect("handoff store value"); + + dst[n..].fill(0); + + n } }