1
0
mirror of https://github.com/samba-team/samba.git synced 2025-04-24 22:50:23 +03:00

lib:crypto: Zero auth_tag array in encryption test

If samba_gnutls_aead_aes_256_cbc_hmac_sha512_encrypt() does not fill the
array completely, we may be comparing uninitialised bytes.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2022-08-02 15:19:02 +12:00 committed by Andrew Bartlett
parent 6932ccf3cc
commit f9850c776f

View File

@ -187,7 +187,7 @@ static void torture_encrypt(void **state)
.length = sizeof(salt_data),
};
DATA_BLOB ctext;
uint8_t auth_tag[64];
uint8_t auth_tag[64] = {0};
assert_int_equal(iv.length, 16);