mirror of
https://github.com/SCST-project/scst.git
synced 2026-07-21 07:22:20 +00:00
6c6e7251b2
Use 'bytes' (the return value from af_alg_final) instead of 'res' (which is 0 after the last successful af_alg_update call) when copying the digest. This bug caused the memcpy to copy 0 bytes, resulting in an uninitialized digest buffer. It also triggered a GCC -Werror=stringop-overflow warning because 'res' could theoretically be negative, leading to a huge unsigned size.