Skip to content

Commit

Permalink
Fix item count calculation of the logs array in yh_com_audit
Browse files Browse the repository at this point in the history
The variable logs is not a byte array and its item count should be
calculated in the correct way.
  • Loading branch information
a-dma committed Aug 11, 2020
1 parent c0352f8 commit 43d695a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands.c
Expand Up @@ -70,7 +70,7 @@ int yh_com_audit(yubihsm_context *ctx, Argument *argv, cmd_format fmt) {
uint16_t unlogged_boot = 0;
uint16_t unlogged_auth = 0;
yh_log_entry logs[YH_MAX_LOG_ENTRIES];
size_t n_items = sizeof(logs);
size_t n_items = sizeof(logs) / sizeof(logs[0]);

switch (fmt) {
case fmt_binary:
Expand Down

0 comments on commit 43d695a

Please sign in to comment.