From 93a9952c90b4e8a96c6787ffc92e233ce097f645 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Tue, 15 Jan 2019 13:52:18 -0500 Subject: Initialize C_len arg to hal_aes_keywrap, or suffer unpredictable failures. --- projects/cli-test/mgmt-timing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/cli-test/mgmt-timing.c b/projects/cli-test/mgmt-timing.c index d3e0245..c1ad3c3 100644 --- a/projects/cli-test/mgmt-timing.c +++ b/projects/cli-test/mgmt-timing.c @@ -520,7 +520,7 @@ static int cmd_timing_hal_aes_keyunwrap(struct cli_def *cli, const char *command } uint8_t wrapped[HAL_KS_WRAPPED_KEYSIZE]; - size_t wrapped_len; + size_t wrapped_len = sizeof(wrapped); if ((err = hal_aes_keywrap(NULL, kek, kek_len, der, der_len, wrapped, &wrapped_len)) != LIBHAL_OK) { cli_print(cli, "hal_aes_keywrap: %s", hal_error_string(err)); return CLI_ERROR; -- cgit v1.2.3