Skip to content

Commit

Permalink
bootloader: fix wrong return for versions endpoint
Browse files Browse the repository at this point in the history
The endpoint provides firmware and signing pubkeys versions, but
the function was returning the lenght of three versions struct,
instead of two.
  • Loading branch information
Beerosagos committed Jan 15, 2025
1 parent 2cbedfb commit 21de44c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bootloader/bootloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ static size_t _api_set_show_firmware_hash(const uint8_t* input, uint8_t* output)
}

/*
* output filled with bootloader version | firmware version | signing pubkeys version
* output filled with firmware version | signing pubkeys version
*/
static size_t _api_versions(uint8_t* output)
{
Expand All @@ -744,7 +744,7 @@ static size_t _api_versions(uint8_t* output)
(const uint8_t*)&data->fields.signing_pubkeys_version,
sizeof(version_t));
_report_status(OP_STATUS_OK, output);
return BOOT_OP_LEN + sizeof(version_t) * 3;
return BOOT_OP_LEN + sizeof(version_t) * 2;
}

static void _api_reboot(void)
Expand Down

0 comments on commit 21de44c

Please sign in to comment.