aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2019-01-15 13:52:18 -0500
committerPaul Selkirk <paul@psgd.org>2019-01-15 13:52:18 -0500
commit93a9952c90b4e8a96c6787ffc92e233ce097f645 (patch)
treee0654f6e03a41acf80ab7f9c44e6804111b12cb6
parent44dc84d3696795fbe0b6f1786cabaa08fd88ade6 (diff)
Initialize C_len arg to hal_aes_keywrap, or suffer unpredictable failures.rsa_timing
-rw-r--r--projects/cli-test/mgmt-timing.c2
1 files changed, 1 insertions, 1 deletions
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;