]> git.codecow.com Git - Monocypher.git/commit
Fixed uninitialised read UB in Argon2
authorLoup Vaillant <loup@loup-vaillant.fr>
Sat, 31 Dec 2022 21:33:50 +0000 (22:33 +0100)
committerLoup Vaillant <loup@loup-vaillant.fr>
Sat, 31 Dec 2022 21:33:50 +0000 (22:33 +0100)
commita27b89c835fdb41c4488e8339690ef450bcf9615
tree7058fa816018825cf8f21cc50d1f251a52a542a5
parenteab55ed1aa9fb5bf562e5702d5c9ce0e3b45e676
Fixed uninitialised read UB in Argon2

The index block was declared in the block loop instead of the segment
loop.  Yet it's only initialised one time out of 128 there, so most of
the time we're accessing uninitialised memory.

It still appeared to work because that that block always occupied the
same spot in the stack. Only Clang's memory sanitiser and the TIS
interpreter caught this.
src/monocypher.c