MIPS: Fix read buffer overflow
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
parent
dd34b5a82f
commit
ea85a0e4cc
1 changed files with 1 additions and 1 deletions
|
@ -144,7 +144,7 @@ static char * __init lookup_psp_var_map(u8 num)
|
||||||
{
|
{
|
||||||
int i;
|
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)
|
if (psp_var_map[i].num == num)
|
||||||
return psp_var_map[i].value;
|
return psp_var_map[i].value;
|
||||||
|
|
||||||
|
|
Reference in a new issue