]> Git Repo - qemu.git/commit
hw/fmopl: Fix buffer access out-of-bounds errors
authorStefan Weil <[email protected]>
Sat, 12 Mar 2011 16:43:56 +0000 (17:43 +0100)
committerBlue Swirl <[email protected]>
Sun, 13 Mar 2011 13:35:21 +0000 (13:35 +0000)
commit913895ab96507db2bc448d3ae72a409407172d2e
tree1b9e950cfb1d73c7d81cbe08fcd780b4276b7345
parent7165448a913bd8f757f588e8f1581c170d8b1775
hw/fmopl: Fix buffer access out-of-bounds errors

Index 75 is one too large for AR_TABLE[75], DR_TABLE[75].
This error was reported by cppcheck.

hw/fmopl.c:600: error: Buffer access out-of-bounds: OPL.AR_TABLE
hw/fmopl.c:601: error: Buffer access out-of-bounds: OPL.DR_TABLE

Fix this by limiting the access to the allowed range.
MultiArcadeMachineEmulator has newer versions of fmopl,
but using these requires more efforts.

Cc: Blue Swirl <[email protected]>
Reviewed-by: malc <[email protected]>
Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
hw/fmopl.c
This page took 0.027777 seconds and 4 git commands to generate.