From: Roel Kluin Date: Wed, 29 Jul 2009 20:02:53 +0000 (+0200) Subject: MIPS: Fix read buffer overflow X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ea85a0e4cc870d2bb92e3b2007007901209bb7de;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git MIPS: Fix read buffer overflow Signed-off-by: Roel Kluin Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/ar7/prom.c b/arch/mips/ar7/prom.c index a320bceb2f9d..5ad6f1db6567 100644 --- a/arch/mips/ar7/prom.c +++ b/arch/mips/ar7/prom.c @@ -144,7 +144,7 @@ static char * __init lookup_psp_var_map(u8 num) { int i; - for (i = 0; i < sizeof(psp_var_map); i++) + for (i = 0; i < ARRAY_SIZE(psp_var_map); i++) if (psp_var_map[i].num == num) return psp_var_map[i].value;