]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/loongarch/cpu: Fix coverity errors about excp_names
authorXiaojuan Yang <yangxiaojuan@loongson.cn>
Fri, 15 Jul 2022 06:07:38 +0000 (14:07 +0800)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 19 Jul 2022 16:23:58 +0000 (21:53 +0530)
commite4ad16f49227be90838511deb03480dc720e76bf
treee5efcd46217fa8dbf75c67fd95c6e9518693928a
parent056dac5384dd4f9f3f2ead0585c4be6104c04d00
target/loongarch/cpu: Fix coverity errors about excp_names

Fix out-of-bounds errors when access excp_names[] array. the valid
boundary size of excp_names should be 0 to ARRAY_SIZE(excp_names)-1.
However, the general code do not consider the max boundary.

Fix coverity CID: 1489758

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