Add a compile-time check before using crypto_verify_16()
This commit is contained in:
parent
9154d7416e
commit
001177251e
@ -107,6 +107,7 @@ crypto_aead_chacha20poly1305_decrypt(unsigned char *m,
|
||||
crypto_onetimeauth_poly1305_final(&state, mac);
|
||||
sodium_memzero(&state, sizeof state);
|
||||
|
||||
(void) sizeof(int[sizeof mac == 16U ? 1 : -1]);
|
||||
ret = crypto_verify_16(mac,
|
||||
c + clen - crypto_aead_chacha20poly1305_ABYTES);
|
||||
sodium_memzero(mac, sizeof mac);
|
||||
|
Loading…
Reference in New Issue
Block a user