From 03c35cf18fa689bc7d727c506d30c396244cb307 Mon Sep 17 00:00:00 2001 From: Paul Iannetta Date: Thu, 24 Aug 2023 10:39:14 +0200 Subject: [PATCH] kvx: fix kvx_reassemble_bundle index 8 out of bounds opcodes/ChangeLog: 2023-08-24 Paul Iannetta * kvx-dis.c (print_insn_kvx): Change the loop condition so that wordcount is always less than KVXMAXBUNDLEWORDS. --- opcodes/kvx-dis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opcodes/kvx-dis.c b/opcodes/kvx-dis.c index e63430a9e57..a78eb5f84ec 100644 --- a/opcodes/kvx-dis.c +++ b/opcodes/kvx-dis.c @@ -1056,7 +1056,7 @@ print_insn_kvx (bfd_vma memaddr, struct disassemble_info *info) wordcount++; } while (kvx_has_parallel_bit (bundle_words[wordcount - 1]) - && wordcount < KVXMAXBUNDLEWORDS); + && wordcount < KVXMAXBUNDLEWORDS - 1); invalid_bundle = kvx_reassemble_bundle (wordcount, &insncount); } -- 2.35.1.500.gb896f729e2