Commit 03e1f044 authored by Dan Carpenter's avatar Dan Carpenter Committed by Matt Turner

alpha: silence a buffer overflow warning

We check that "member" is in bounds for the first line, but we also use
it on the next line without checking which is a mistake.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
parent b5a3a128
...@@ -1094,7 +1094,8 @@ get_sysnames(unsigned long type, unsigned long variation, unsigned long cpu, ...@@ -1094,7 +1094,8 @@ get_sysnames(unsigned long type, unsigned long variation, unsigned long cpu,
default: /* default to variation "0" for now */ default: /* default to variation "0" for now */
break; break;
case ST_DEC_EB164: case ST_DEC_EB164:
if (member < ARRAY_SIZE(eb164_indices)) if (member >= ARRAY_SIZE(eb164_indices))
break;
*variation_name = eb164_names[eb164_indices[member]]; *variation_name = eb164_names[eb164_indices[member]];
/* PC164 may show as EB164 variation, but with EV56 CPU, /* PC164 may show as EB164 variation, but with EV56 CPU,
so, since no true EB164 had anything but EV5... */ so, since no true EB164 had anything but EV5... */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment