mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-11-19 21:43:58 +01:00
The serde deserialize helpers copied fixed-length byte arrays (b.copy_from_slice(&bytes[0..N])) without checking the decoded length, so a slatepack with a short pubkey/signature/uuid field panicked the wallet during deserialization. The binary path was hardened in 25dab9f; do the same for the JSON modules: reject any field whose decoded length is not exactly N. Adds a regression test that exercised the panic.