Skip to content

Commit

Permalink
MIPS: Fix read buffer overflow
Browse files Browse the repository at this point in the history
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Roel Kluin authored and Ralf Baechle committed Aug 3, 2009
1 parent dd34b5a commit ea85a0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/ar7/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ea85a0e

Please sign in to comment.