Merge tag 'efi-2023-01-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2023-01-rc1 UEFI: * Provide driver binding protocol to registered events for block devices * Code simplification and refactoring * Fix pylint errors in test_efi_secboot Other: * Improve checks for register ranges
This commit is contained in:
@@ -399,7 +399,7 @@ int regmap_raw_read_range(struct regmap *map, uint range_num, uint offset,
|
||||
range = &map->ranges[range_num];
|
||||
|
||||
offset <<= map->reg_offset_shift;
|
||||
if (offset + val_len > range->size) {
|
||||
if (offset + val_len > range->size || offset + val_len < offset) {
|
||||
debug("%s: offset/size combination invalid\n", __func__);
|
||||
return -ERANGE;
|
||||
}
|
||||
@@ -538,7 +538,7 @@ int regmap_raw_write_range(struct regmap *map, uint range_num, uint offset,
|
||||
range = &map->ranges[range_num];
|
||||
|
||||
offset <<= map->reg_offset_shift;
|
||||
if (offset + val_len > range->size) {
|
||||
if (offset + val_len > range->size || offset + val_len < offset) {
|
||||
debug("%s: offset/size combination invalid\n", __func__);
|
||||
return -ERANGE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user