Closed qarmin closed 10 months ago
You serialize Vec<HeavyStruct>
but you deserialize BTreeSet<DifferentHeavyStruct>
. These two structs are different, bincode does not support this
I know that - I wanted to find minimal code that cause panic/crash.
Crashing entire app is not right solution when trying to deserialize untrusted file, so here should be returned Err() like in similar invalid situations
You need to configure bincode to limit its possible allocation. Refer to this documentation on how to do that https://docs.rs/bincode/latest/bincode/config/trait.Options.html#method.with_limit
Project - ttttt.zip Code
crashes with random messages