mirror of
https://github.com/samba-team/samba.git
synced 2025-04-26 02:50:29 +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:
parent
6932ccf3cc
commit
f9850c776f
@ -187,7 +187,7 @@ static void torture_encrypt(void **state)
|
|||||||
.length = sizeof(salt_data),
|
.length = sizeof(salt_data),
|
||||||
};
|
};
|
||||||
DATA_BLOB ctext;
|
DATA_BLOB ctext;
|
||||||
uint8_t auth_tag[64];
|
uint8_t auth_tag[64] = {0};
|
||||||
|
|
||||||
assert_int_equal(iv.length, 16);
|
assert_int_equal(iv.length, 16);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user