MIPS patches 2016-04-08
Changes: * fix off-by-one error in ITU -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJXB300AAoJEFIRjjwLKdprPP4IAJIP7DyeQz9fQhckk+oKWvUo 4h2W5Rx+6KhWE+kvdi1cNwWuIGdwByjodC8mS5hQjJyPs/NIWE8q+8YoxrfTxFaS 2OkTr4IKb1l+8myVk36MThsw+PXkI4XA3PP3paTJ5u6rxyZgLcpMlfzx4Mn1cNYh SVQ3zjO6q49ZuqJbXyUTEMu+Fpqzp1ejHz+GLKeGvLMAW559XBsMOQurtXIGKN1w ZOc214FIdx4K5Ywtl7nLt1xwiRocnORdYOjqW09PhELxMM+sg/3tse5UJMZV5Moi WYk4dt8wVUIxoMTu9I1cn7afiVN53u2YO6bvyESTf+z9bBYuwWCOiFnIEegf0FA= =ZPQ1 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/lalrae/tags/mips-20160408' into staging MIPS patches 2016-04-08 Changes: * fix off-by-one error in ITU # gpg: Signature made Fri 08 Apr 2016 10:43:16 BST using RSA key ID 0B29DA6B # gpg: Good signature from "Leon Alrae <leon.alrae@imgtec.com>" * remotes/lalrae/tags/mips-20160408: hw/mips_itu: fix off-by-one reported by Coverity Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
9628af036f
|
@ -66,18 +66,13 @@ static uint64_t itc_tag_read(void *opaque, hwaddr addr, unsigned size)
|
|||
{
|
||||
MIPSITUState *tag = (MIPSITUState *)opaque;
|
||||
uint64_t index = addr >> 3;
|
||||
uint64_t ret = 0;
|
||||
|
||||
switch (index) {
|
||||
case 0 ... ITC_ADDRESSMAP_NUM:
|
||||
ret = tag->ITCAddressMap[index];
|
||||
break;
|
||||
default:
|
||||
if (index >= ITC_ADDRESSMAP_NUM) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "Read 0x%" PRIx64 "\n", addr);
|
||||
break;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return tag->ITCAddressMap[index];
|
||||
}
|
||||
|
||||
static void itc_reconfigure(MIPSITUState *tag)
|
||||
|
|
Loading…
Reference in a new issue