mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-23 04:26:46 -04:00
Exporter tests: Initialize allocated memory
Signed-off-by: Max Fillinger <max@max-fillinger.net>
This commit is contained in:
parent
8f12e31223
commit
8a2d2adf8c
@ -5251,6 +5251,9 @@ void ssl_tls_exporter_consistent_result(int proto, int exported_key_length, int
|
||||
TEST_CALLOC(key_buffer_server, exported_key_length);
|
||||
TEST_CALLOC(key_buffer_client, exported_key_length);
|
||||
|
||||
memset(key_buffer_server, 0, exported_key_length);
|
||||
memset(key_buffer_client, 0, exported_key_length);
|
||||
|
||||
char label[] = "test-label";
|
||||
unsigned char context[128] = { 0 };
|
||||
ret = mbedtls_ssl_export_keying_material(&server_ep.ssl,
|
||||
@ -5412,6 +5415,10 @@ void ssl_tls_exporter_rejects_bad_parameters(
|
||||
TEST_CALLOC(label, label_length);
|
||||
TEST_CALLOC(context, context_length);
|
||||
|
||||
memset(key_buffer, 0, exported_key_length);
|
||||
memset(label, 0, label_length);
|
||||
memset(context, 0, context_length);
|
||||
|
||||
ret = mbedtls_test_ssl_do_handshake_with_endpoints(&server_ep, &client_ep, &options, proto);
|
||||
TEST_ASSERT(ret == 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user