Context: #124
We should return an error in these cases:
- conversion from
u32 to usize fails
- offset calculation overflows
block exceeds the configured block count
I think LFS_ERR_INVAL would be an appropriate error code.
In a second step, we should make sure that overflows cannot happen by validating the lengths in Allocation::with_config.
@sosthene-nitrokey What do you think?
Context: #124
We should return an error in these cases:
u32tousizefailsblockexceeds the configured block countI think
LFS_ERR_INVALwould be an appropriate error code.In a second step, we should make sure that overflows cannot happen by validating the lengths in
Allocation::with_config.@sosthene-nitrokey What do you think?