mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 19:25:45 +01:00
Increase okm_hex buffer to contain null character
Add an additional byte for the `okm_hex` buffer, to assure it is null-terminated in case `okm` is 128 bytes long.
This commit is contained in:
parent
57c2a301a3
commit
da04b3b972
@ -21,9 +21,9 @@ void test_hkdf( int md_alg, char *hex_ikm_string, char *hex_salt_string,
|
||||
unsigned char okm[128] = { '\0' };
|
||||
/*
|
||||
* okm_hex is the string representation of okm,
|
||||
* so its size is twice the size of okm.
|
||||
* so its size is twice the size of okm, and an extra null-termination.
|
||||
*/
|
||||
unsigned char okm_hex[256] = { '\0' };
|
||||
unsigned char okm_hex[257] = { '\0' };
|
||||
|
||||
const mbedtls_md_info_t *md = mbedtls_md_info_from_type( md_alg );
|
||||
TEST_ASSERT( md != NULL );
|
||||
|
Loading…
Reference in New Issue
Block a user