Skip to content

Commit

Permalink
i2400m: keep index within ms_to_errno[]
Browse files Browse the repository at this point in the history
Ensure that index `status' remains within ms_to_errno[]

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
  • Loading branch information
Roel Kluin authored and Inaky Perez-Gonzalez committed Oct 19, 2009
1 parent c29eaf3 commit a6346fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wimax/i2400m/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ int i2400m_msg_check_status(const struct i2400m_l3l4_hdr *l3l4_hdr,

if (status == 0)
return 0;
if (status > ARRAY_SIZE(ms_to_errno)) {
if (status >= ARRAY_SIZE(ms_to_errno)) {
str = "unknown status code";
result = -EBADR;
} else {
Expand Down

0 comments on commit a6346fa

Please sign in to comment.