Closed jnhev42 closed 1 year ago
As a general rule, casting a vec to an array is not a great thing, but it can be convenient. Most of the critical bits use fixed-length arrays (keys, nonces, etc) so while this is indeed a bug, I wouldn't consider it critical.
In any case, thanks for reporting it. I've added an assertion which will trigger an error in both debug and release mode.
What happened?
This code:
will cast Vec's of a size below LENGTH to an array of LENGTH, leading to out-of-bounds reads source link
Version
0.4.0
Which OS are you seeing the problem on?
Linux
Test code