From: Antti P Miettinen Date: Thu, 21 Nov 2013 22:32:05 +0000 (-0800) Subject: block/partitions/efi.c: fix bound check X-Git-Tag: v3.13-rc1~17^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49204c116a9ee24536d371be02a2f05e6493c949;p=pandora-kernel.git 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 Reviewed-by: Hiroshi Doyu Tested-by: Hiroshi Doyu Cc: Will Drewry Cc: Matt Fleming Acked-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed