]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/loongarch/op_helper: Fix coverity cond_at_most error
authorXiaojuan Yang <yangxiaojuan@loongson.cn>
Fri, 15 Jul 2022 06:07:40 +0000 (14:07 +0800)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 19 Jul 2022 16:23:58 +0000 (21:53 +0530)
commit064357041d64331e3dbc18629d07abf88ce0f6bb
tree05521aef2d90f4526413a9fa4e7a091b12f7df00
parent2b3ef8e5c607130dc5a70f12cc7c6ee68c3844df
target/loongarch/op_helper: Fix coverity cond_at_most error

The boundary size of cpucfg array should be 0 to ARRAY_SIZE(cpucfg)-1.
So, using index bigger than max boundary to access cpucfg[] must be
forbidden.

Fix coverity CID: 1489760

Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220715060740.1500628-6-yangxiaojuan@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/loongarch/op_helper.c