提交 a6346fa5 编写于 作者: R Roel Kluin 提交者: Inaky Perez-Gonzalez

i2400m: keep index within ms_to_errno[]

Ensure that index `status' remains within ms_to_errno[]
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NInaky Perez-Gonzalez <inaky@linux.intel.com>
上级 c29eaf3f
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册