mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
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;
|
||||
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue