mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 20:05:54 +00:00
usb_block: fix upper block-number range check
The driver wrongly rejected a block request for the very last block of the device, which prevented part_block from successfully parsing the partition table (when attempting to access the GPT backup). Fixes #3861
This commit is contained in:
parent
a68a6665ac
commit
8b556a9435
@ -852,7 +852,7 @@ struct Usb::Block_driver : Usb::Completion
|
||||
|
||||
/* range check */
|
||||
block_number_t const last = op.block_number + op.count;
|
||||
if (last >= info().block_count)
|
||||
if (last > info().block_count)
|
||||
return Response::REJECTED;
|
||||
|
||||
/* check if request is pending */
|
||||
|
Loading…
x
Reference in New Issue
Block a user