« Previous | Next » 

Revision 913895ab

ID913895ab96507db2bc448d3ae72a409407172d2e

Added by Stefan Weil about 13 years ago

hw/fmopl: Fix buffer access out-of-bounds errors

Index 75 is one too large for AR_TABLE75, DR_TABLE75.
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 <>
Reviewed-by: malc <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences