diff --git a/core/recovery.c b/core/recovery.c index 18a88ba..07f1c99 100644 --- a/core/recovery.c +++ b/core/recovery.c @@ -284,7 +284,6 @@ static int recovery_handle_write(eos_slot_t slot, uint32_t offset, uint16_t len) /* offset/len come straight from the wire; without this check a * recovery client can write past the slot boundary into the other * slot, boot-control blocks, or the boot log. */ - uint32_t slot_size = eos_hal_slot_size(slot); if (slot_size == 0 || (uint64_t)offset + len > (uint64_t)slot_size) return recovery_send_nack(); @@ -514,4 +513,4 @@ int eos_recovery_enter(eos_bootctl_t *bctl) } return EOS_OK; -} +} \ No newline at end of file diff --git a/include/eos_image.h b/include/eos_image.h index 049e6c8..a2a9d18 100644 --- a/include/eos_image.h +++ b/include/eos_image.h @@ -146,7 +146,7 @@ int eos_crc32_checked(uint32_t addr, size_t len, uint32_t *out_crc); * @param len Length in bytes. * @return CRC32 value, or 0 if the region could not be read. */ -int eos_crc32(uint32_t addr, size_t len, uint32_t *out); +uint32_t eos_crc32(uint32_t addr, size_t len); #ifdef __cplusplus }