Skip to content

Commit d94935e

Browse files
committed
bootloader: fix wrong return for versions endpoint
The endpoint provides firmware and signing pubkeys versions, but the function was returning the lenght of three versions struct, instead of two.
1 parent 160e154 commit d94935e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bootloader/bootloader.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ static size_t _api_set_show_firmware_hash(const uint8_t* input, uint8_t* output)
731731
}
732732

733733
/*
734-
* output filled with bootloader version | firmware version | signing pubkeys version
734+
* output filled with firmware version | signing pubkeys version
735735
*/
736736
static size_t _api_versions(uint8_t* output)
737737
{
@@ -742,7 +742,7 @@ static size_t _api_versions(uint8_t* output)
742742
(const uint8_t*)&data->fields.signing_pubkeys_version,
743743
sizeof(version_t));
744744
_report_status(OP_STATUS_OK, output);
745-
return BOOT_OP_LEN + sizeof(version_t) * 3;
745+
return BOOT_OP_LEN + sizeof(version_t) * 2;
746746
}
747747

748748
static void _api_reboot(void)

0 commit comments

Comments
 (0)