Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block/partitions/efi.c: fix bound check
Use ARRAY_SIZE instead of sizeof to get proper max for label length. Since this is just a read out of bounds it's not that bad, but the problem becomes user-visible eg if one tries to use DEBUG_PAGEALLOC and DEBUG_RODATA, at least with some enhancements from Hiroshi. Of course the destination array can contain garbage when we read beyond the end of source array so that would be another user-visible problem. Signed-off-by: Antti P Miettinen <[email protected]> Reviewed-by: Hiroshi Doyu <[email protected]> Tested-by: Hiroshi Doyu <[email protected]> Cc: Will Drewry <[email protected]> Cc: Matt Fleming <[email protected]> Acked-by: Davidlohr Bueso <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information