mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-04 15:54:25 +08:00
kvx: fix kvx_reassemble_bundle index 8 out of bounds
opcodes/ * kvx-dis.c (print_insn_kvx): Change the loop condition so that wordcount is always less than KVXMAXBUNDLEWORDS. (decode_prologue_epilogue_bundle): Likewise.
This commit is contained in:
parent
476dd29dc6
commit
f1917fc631
@ -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);
|
||||
}
|
||||
|
||||
@ -1238,7 +1238,7 @@ decode_prologue_epilogue_bundle (bfd_vma memaddr,
|
||||
nb_syl++;
|
||||
}
|
||||
while (kvx_has_parallel_bit (bundle_words[nb_syl - 1])
|
||||
&& nb_syl < KVXMAXBUNDLEWORDS);
|
||||
&& nb_syl < KVXMAXBUNDLEWORDS - 1);
|
||||
if (kvx_reassemble_bundle (nb_syl, &nb_insn))
|
||||
return -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user