Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/openmsx-16.0/Contrib/base64.cc
Examining data/openmsx-16.0/Contrib/catch2/catch.hpp
Examining data/openmsx-16.0/Contrib/dmk/analyze-dmk.cc
Examining data/openmsx-16.0/Contrib/dmk/combine-dmk.cc
Examining data/openmsx-16.0/Contrib/dmk/der2dmk.cc
Examining data/openmsx-16.0/Contrib/dmk/dsk2dmk.cc
Examining data/openmsx-16.0/Contrib/dmk/empty-dmk.cc
Examining data/openmsx-16.0/Contrib/dmk/svi2dmk.cc
Examining data/openmsx-16.0/Contrib/dmk/svicpm2dmk.cc
Examining data/openmsx-16.0/Contrib/openmsx-control-socket.cc
Examining data/openmsx-16.0/Contrib/openmsx-control-stdio.cc
Examining data/openmsx-16.0/src/Autofire.cc
Examining data/openmsx-16.0/src/CLIOption.cc
Examining data/openmsx-16.0/src/CartridgeSlotManager.cc
Examining data/openmsx-16.0/src/ChakkariCopy.cc
Examining data/openmsx-16.0/src/CliExtension.cc
Examining data/openmsx-16.0/src/CommandLineParser.cc
Examining data/openmsx-16.0/src/Connector.cc
Examining data/openmsx-16.0/src/DebugDevice.cc
Examining data/openmsx-16.0/src/DeviceFactory.cc
Examining data/openmsx-16.0/src/DummyDevice.cc
Examining data/openmsx-16.0/src/DummyPrinterPortDevice.cc
Examining data/openmsx-16.0/src/DynamicClock.cc
Examining data/openmsx-16.0/src/EmptyPatch.cc
Examining data/openmsx-16.0/src/EmuTime.cc
Examining data/openmsx-16.0/src/FirmwareSwitch.cc
Examining data/openmsx-16.0/src/GlobalSettings.cc
Examining data/openmsx-16.0/src/I8255.cc
Examining data/openmsx-16.0/src/IPSPatch.cc
Examining data/openmsx-16.0/src/LedStatus.cc
Examining data/openmsx-16.0/src/MSXBunsetsu.cc
Examining data/openmsx-16.0/src/MSXCielTurbo.cc
Examining data/openmsx-16.0/src/MSXDevice.cc
Examining data/openmsx-16.0/src/MSXDeviceSwitch.cc
Examining data/openmsx-16.0/src/MSXE6Timer.cc
Examining data/openmsx-16.0/src/MSXHiResTimer.cc
Examining data/openmsx-16.0/src/MSXKanji.cc
Examining data/openmsx-16.0/src/MSXKanji12.cc
Examining data/openmsx-16.0/src/MSXMatsushita.cc
Examining data/openmsx-16.0/src/MSXMotherBoard.cc
Examining data/openmsx-16.0/src/MSXPPI.cc
Examining data/openmsx-16.0/src/MSXPrinterPort.cc
Examining data/openmsx-16.0/src/MSXRTC.cc
Examining data/openmsx-16.0/src/MSXResetStatusRegister.cc
Examining data/openmsx-16.0/src/MSXS1985.cc
Examining data/openmsx-16.0/src/MSXS1990.cc
Examining data/openmsx-16.0/src/MSXSwitchedDevice.cc
Examining data/openmsx-16.0/src/MSXTurboRPause.cc
Examining data/openmsx-16.0/src/MSXVictorHC9xSystemControl.cc
Examining data/openmsx-16.0/src/PasswordCart.cc
Examining data/openmsx-16.0/src/Pluggable.cc
Examining data/openmsx-16.0/src/PluggableFactory.cc
Examining data/openmsx-16.0/src/PluggingController.cc
Examining data/openmsx-16.0/src/Printer.cc
Examining data/openmsx-16.0/src/PrinterPortDevice.cc
Examining data/openmsx-16.0/src/PrinterPortLogger.cc
Examining data/openmsx-16.0/src/PrinterPortSimpl.cc
Examining data/openmsx-16.0/src/RP5C01.cc
Examining data/openmsx-16.0/src/RTSchedulable.cc
Examining data/openmsx-16.0/src/RTScheduler.cc
Examining data/openmsx-16.0/src/Reactor.cc
Examining data/openmsx-16.0/src/RealTime.cc
Examining data/openmsx-16.0/src/RenShaTurbo.cc
Examining data/openmsx-16.0/src/ReplayCLI.cc
Examining data/openmsx-16.0/src/ReverseManager.cc
Examining data/openmsx-16.0/src/SVIPPI.cc
Examining data/openmsx-16.0/src/SVIPrinterPort.cc
Examining data/openmsx-16.0/src/SaveStateCLI.cc
Examining data/openmsx-16.0/src/Schedulable.cc
Examining data/openmsx-16.0/src/Scheduler.cc
Examining data/openmsx-16.0/src/SensorKid.cc
Examining data/openmsx-16.0/src/SpeedManager.cc
Examining data/openmsx-16.0/src/ThrottleManager.cc
Examining data/openmsx-16.0/src/Version.cc
Examining data/openmsx-16.0/src/cassette/CasImage.cc
Examining data/openmsx-16.0/src/cassette/CassetteDevice.cc
Examining data/openmsx-16.0/src/cassette/CassetteImage.cc
Examining data/openmsx-16.0/src/cassette/CassettePlayer.cc
Examining data/openmsx-16.0/src/cassette/CassettePlayerCLI.cc
Examining data/openmsx-16.0/src/cassette/CassettePort.cc
Examining data/openmsx-16.0/src/cassette/DummyCassetteDevice.cc
Examining data/openmsx-16.0/src/cassette/WavImage.cc
Examining data/openmsx-16.0/src/commands/Command.cc
Examining data/openmsx-16.0/src/commands/CommandException.cc
Examining data/openmsx-16.0/src/commands/Completer.cc
Examining data/openmsx-16.0/src/commands/GlobalCommandController.cc
Examining data/openmsx-16.0/src/commands/InfoCommand.cc
Examining data/openmsx-16.0/src/commands/InfoTopic.cc
Examining data/openmsx-16.0/src/commands/Interpreter.cc
Examining data/openmsx-16.0/src/commands/MSXCommandController.cc
Examining data/openmsx-16.0/src/commands/ProxyCommand.cc
Examining data/openmsx-16.0/src/commands/TclArgParser.cc
Examining data/openmsx-16.0/src/commands/TclCallback.cc
Examining data/openmsx-16.0/src/commands/TclObject.cc
Examining data/openmsx-16.0/src/commands/TclParser.cc
Examining data/openmsx-16.0/src/config/DeviceConfig.cc
Examining data/openmsx-16.0/src/config/HardwareConfig.cc
Examining data/openmsx-16.0/src/config/SettingsConfig.cc
Examining data/openmsx-16.0/src/config/XMLElement.cc
Examining data/openmsx-16.0/src/config/XMLLoader.cc
Examining data/openmsx-16.0/src/console/CommandConsole.cc
Examining data/openmsx-16.0/src/console/OSDGUI.cc
Examining data/openmsx-16.0/src/console/OSDGUILayer.cc
Examining data/openmsx-16.0/src/console/OSDImageBasedWidget.cc
Examining data/openmsx-16.0/src/console/OSDRectangle.cc
Examining data/openmsx-16.0/src/console/OSDTopWidget.cc
Examining data/openmsx-16.0/src/console/OSDWidget.cc
Examining data/openmsx-16.0/src/console/TTFFont.cc
Examining data/openmsx-16.0/src/console/OSDConsoleRenderer.cc
Examining data/openmsx-16.0/src/console/OSDText.cc
Examining data/openmsx-16.0/src/cpu/BreakPointBase.cc
Examining data/openmsx-16.0/src/cpu/CPUClock.cc
Examining data/openmsx-16.0/src/cpu/CPUCore.cc
Examining data/openmsx-16.0/src/cpu/CPURegs.cc
Examining data/openmsx-16.0/src/cpu/Dasm.cc
Examining data/openmsx-16.0/src/cpu/IRQHelper.cc
Examining data/openmsx-16.0/src/cpu/MSXCPU.cc
Examining data/openmsx-16.0/src/cpu/MSXCPUInterface.cc
Examining data/openmsx-16.0/src/cpu/MSXMultiDevice.cc
Examining data/openmsx-16.0/src/cpu/MSXMultiIODevice.cc
Examining data/openmsx-16.0/src/cpu/MSXMultiMemDevice.cc
Examining data/openmsx-16.0/src/cpu/MSXWatchIODevice.cc
Examining data/openmsx-16.0/src/cpu/VDPIODelay.cc
Examining data/openmsx-16.0/src/debugger/DasmTables.cc
Examining data/openmsx-16.0/src/debugger/Debugger.cc
Examining data/openmsx-16.0/src/debugger/Probe.cc
Examining data/openmsx-16.0/src/debugger/ProbeBreakPoint.cc
Examining data/openmsx-16.0/src/debugger/SimpleDebuggable.cc
Examining data/openmsx-16.0/src/events/AdhocCliCommParser.cc
Examining data/openmsx-16.0/src/events/AfterCommand.cc
Examining data/openmsx-16.0/src/events/CliComm.cc
Examining data/openmsx-16.0/src/events/CliConnection.cc
Examining data/openmsx-16.0/src/events/CliServer.cc
Examining data/openmsx-16.0/src/events/Event.cc
Examining data/openmsx-16.0/src/events/EventDistributor.cc
Examining data/openmsx-16.0/src/events/GlobalCliComm.cc
Examining data/openmsx-16.0/src/events/HotKey.cc
Examining data/openmsx-16.0/src/events/InputEventFactory.cc
Examining data/openmsx-16.0/src/events/InputEventGenerator.cc
Examining data/openmsx-16.0/src/events/InputEvents.cc
Examining data/openmsx-16.0/src/events/Keys.cc
Examining data/openmsx-16.0/src/events/MSXCliComm.cc
Examining data/openmsx-16.0/src/events/MessageCommand.cc
Examining data/openmsx-16.0/src/events/Socket.cc
Examining data/openmsx-16.0/src/events/StdioMessages.cc
Examining data/openmsx-16.0/src/events/TclCallbackMessages.cc
Examining data/openmsx-16.0/src/fdc/AVTFDC.cc
Examining data/openmsx-16.0/src/fdc/BootBlocks.cc
Examining data/openmsx-16.0/src/fdc/DMKDiskImage.cc
Examining data/openmsx-16.0/src/fdc/DSKDiskImage.cc
Examining data/openmsx-16.0/src/fdc/DirAsDSK.cc
Examining data/openmsx-16.0/src/fdc/Disk.cc
Examining data/openmsx-16.0/src/fdc/DiskChanger.cc
Examining data/openmsx-16.0/src/fdc/DiskContainer.cc
Examining data/openmsx-16.0/src/fdc/DiskDrive.cc
Examining data/openmsx-16.0/src/fdc/DiskFactory.cc
Examining data/openmsx-16.0/src/fdc/DiskImageCLI.cc
Examining data/openmsx-16.0/src/fdc/DiskImageUtils.cc
Examining data/openmsx-16.0/src/fdc/DiskManipulator.cc
Examining data/openmsx-16.0/src/fdc/DiskName.cc
Examining data/openmsx-16.0/src/fdc/DiskPartition.cc
Examining data/openmsx-16.0/src/fdc/DriveMultiplexer.cc
Examining data/openmsx-16.0/src/fdc/DummyDisk.cc
Examining data/openmsx-16.0/src/fdc/EmptyDiskPatch.cc
Examining data/openmsx-16.0/src/fdc/MSXFDC.cc
Examining data/openmsx-16.0/src/fdc/MSXtar.cc
Examining data/openmsx-16.0/src/fdc/MicrosolFDC.cc
Examining data/openmsx-16.0/src/fdc/NationalFDC.cc
Examining data/openmsx-16.0/src/fdc/NowindCommand.cc
Examining data/openmsx-16.0/src/fdc/NowindHost.cc
Examining data/openmsx-16.0/src/fdc/NowindInterface.cc
Examining data/openmsx-16.0/src/fdc/NowindRomDisk.cc
Examining data/openmsx-16.0/src/fdc/PhilipsFDC.cc
Examining data/openmsx-16.0/src/fdc/RamDSKDiskImage.cc
Examining data/openmsx-16.0/src/fdc/RawTrack.cc
Examining data/openmsx-16.0/src/fdc/RealDrive.cc
Examining data/openmsx-16.0/src/fdc/SVIFDC.cc
Examining data/openmsx-16.0/src/fdc/SanyoFDC.cc
Examining data/openmsx-16.0/src/fdc/SectorAccessibleDisk.cc
Examining data/openmsx-16.0/src/fdc/SectorBasedDisk.cc
Examining data/openmsx-16.0/src/fdc/SpectravideoFDC.cc
Examining data/openmsx-16.0/src/fdc/TC8566AF.cc
Examining data/openmsx-16.0/src/fdc/ToshibaFDC.cc
Examining data/openmsx-16.0/src/fdc/TurboRFDC.cc
Examining data/openmsx-16.0/src/fdc/VictorFDC.cc
Examining data/openmsx-16.0/src/fdc/WD2793.cc
Examining data/openmsx-16.0/src/fdc/WD2793BasedFDC.cc
Examining data/openmsx-16.0/src/fdc/XSADiskImage.cc
Examining data/openmsx-16.0/src/fdc/YamahaFDC.cc
Examining data/openmsx-16.0/src/file/CompressedFileAdapter.cc
Examining data/openmsx-16.0/src/file/File.cc
Examining data/openmsx-16.0/src/file/FileBase.cc
Examining data/openmsx-16.0/src/file/FileContext.cc
Examining data/openmsx-16.0/src/file/FileOperations.cc
Examining data/openmsx-16.0/src/file/FilePool.cc
Examining data/openmsx-16.0/src/file/Filename.cc
Examining data/openmsx-16.0/src/file/GZFileAdapter.cc
Examining data/openmsx-16.0/src/file/LocalFile.cc
Examining data/openmsx-16.0/src/file/LocalFileReference.cc
Examining data/openmsx-16.0/src/file/PreCacheFile.cc
Examining data/openmsx-16.0/src/file/ReadDir.cc
Examining data/openmsx-16.0/src/file/ZipFileAdapter.cc
Examining data/openmsx-16.0/src/file/ZlibInflate.cc
Examining data/openmsx-16.0/src/ide/AbstractIDEDevice.cc
Examining data/openmsx-16.0/src/ide/BeerIDE.cc
Examining data/openmsx-16.0/src/ide/CDImageCLI.cc
Examining data/openmsx-16.0/src/ide/DummyIDEDevice.cc
Examining data/openmsx-16.0/src/ide/DummySCSIDevice.cc
Examining data/openmsx-16.0/src/ide/GoudaSCSI.cc
Examining data/openmsx-16.0/src/ide/HD.cc
Examining data/openmsx-16.0/src/ide/HDCommand.cc
Examining data/openmsx-16.0/src/ide/HDImageCLI.cc
Examining data/openmsx-16.0/src/ide/IDECDROM.cc
Examining data/openmsx-16.0/src/ide/IDEDeviceFactory.cc
Examining data/openmsx-16.0/src/ide/IDEHD.cc
Examining data/openmsx-16.0/src/ide/MB89352.cc
Examining data/openmsx-16.0/src/ide/MegaSCSI.cc
Examining data/openmsx-16.0/src/ide/SCSIHD.cc
Examining data/openmsx-16.0/src/ide/SCSILS120.cc
Examining data/openmsx-16.0/src/ide/SunriseIDE.cc
Examining data/openmsx-16.0/src/ide/WD33C93.cc
Examining data/openmsx-16.0/src/input/ArkanoidPad.cc
Examining data/openmsx-16.0/src/input/ColecoJoystickIO.cc
Examining data/openmsx-16.0/src/input/DummyJoystick.cc
Examining data/openmsx-16.0/src/input/EventDelay.cc
Examining data/openmsx-16.0/src/input/JoyMega.cc
Examining data/openmsx-16.0/src/input/JoyTap.cc
Examining data/openmsx-16.0/src/input/Joystick.cc
Examining data/openmsx-16.0/src/input/JoystickDevice.cc
Examining data/openmsx-16.0/src/input/JoystickPort.cc
Examining data/openmsx-16.0/src/input/KeyJoystick.cc
Examining data/openmsx-16.0/src/input/Keyboard.cc
Examining data/openmsx-16.0/src/input/KeyboardSettings.cc
Examining data/openmsx-16.0/src/input/MSXEventDistributor.cc
Examining data/openmsx-16.0/src/input/MagicKey.cc
Examining data/openmsx-16.0/src/input/Mouse.cc
Examining data/openmsx-16.0/src/input/NinjaTap.cc
Examining data/openmsx-16.0/src/input/Paddle.cc
Examining data/openmsx-16.0/src/input/RecordedCommand.cc
Examining data/openmsx-16.0/src/input/SETetrisDongle.cc
Examining data/openmsx-16.0/src/input/StateChangeDistributor.cc
Examining data/openmsx-16.0/src/input/Touchpad.cc
Examining data/openmsx-16.0/src/input/Trackball.cc
Examining data/openmsx-16.0/src/input/UnicodeKeymap.cc
Examining data/openmsx-16.0/src/laserdisc/LaserdiscPlayer.cc
Examining data/openmsx-16.0/src/laserdisc/LaserdiscPlayerCLI.cc
Examining data/openmsx-16.0/src/laserdisc/OggReader.cc
Examining data/openmsx-16.0/src/laserdisc/PioneerLDControl.cc
Examining data/openmsx-16.0/src/laserdisc/yuv2rgb.cc
Examining data/openmsx-16.0/src/main.cc
Examining data/openmsx-16.0/src/memory/AmdFlash.cc
Examining data/openmsx-16.0/src/memory/Carnivore2.cc
Examining data/openmsx-16.0/src/memory/CheckedRam.cc
Examining data/openmsx-16.0/src/memory/ColecoSuperGameModule.cc
Examining data/openmsx-16.0/src/memory/EEPROM_93C46.cc
Examining data/openmsx-16.0/src/memory/ESE_RAM.cc
Examining data/openmsx-16.0/src/memory/ESE_SCC.cc
Examining data/openmsx-16.0/src/memory/FraelSwitchableROM.cc
Examining data/openmsx-16.0/src/memory/KonamiUltimateCollection.cc
Examining data/openmsx-16.0/src/memory/MSXHBI55.cc
Examining data/openmsx-16.0/src/memory/MSXMapperIO.cc
Examining data/openmsx-16.0/src/memory/MSXMegaRam.cc
Examining data/openmsx-16.0/src/memory/MSXMemoryMapper.cc
Examining data/openmsx-16.0/src/memory/MSXMemoryMapperBase.cc
Examining data/openmsx-16.0/src/memory/MSXMirrorDevice.cc
Examining data/openmsx-16.0/src/memory/MSXPac.cc
Examining data/openmsx-16.0/src/memory/MSXRam.cc
Examining data/openmsx-16.0/src/memory/MSXRom.cc
Examining data/openmsx-16.0/src/memory/MSXRomCLI.cc
Examining data/openmsx-16.0/src/memory/MegaFlashRomSCCPlus.cc
Examining data/openmsx-16.0/src/memory/MegaFlashRomSCCPlusSD.cc
Examining data/openmsx-16.0/src/memory/MusicalMemoryMapper.cc
Examining data/openmsx-16.0/src/memory/PanasonicMemory.cc
Examining data/openmsx-16.0/src/memory/PanasonicRam.cc
Examining data/openmsx-16.0/src/memory/ROMHunterMk2.cc
Examining data/openmsx-16.0/src/memory/Ram.cc
Examining data/openmsx-16.0/src/memory/ReproCartridgeV1.cc
Examining data/openmsx-16.0/src/memory/ReproCartridgeV2.cc
Examining data/openmsx-16.0/src/memory/Rom.cc
Examining data/openmsx-16.0/src/memory/RomArc.cc
Examining data/openmsx-16.0/src/memory/RomAscii16_2.cc
Examining data/openmsx-16.0/src/memory/RomAscii16kB.cc
Examining data/openmsx-16.0/src/memory/RomAscii8_8.cc
Examining data/openmsx-16.0/src/memory/RomAscii8kB.cc
Examining data/openmsx-16.0/src/memory/RomBlocks.cc
Examining data/openmsx-16.0/src/memory/RomColecoMegaCart.cc
Examining data/openmsx-16.0/src/memory/RomCrossBlaim.cc
Examining data/openmsx-16.0/src/memory/RomDRAM.cc
Examining data/openmsx-16.0/src/memory/RomDatabase.cc
Examining data/openmsx-16.0/src/memory/RomDooly.cc
Examining data/openmsx-16.0/src/memory/RomFSA1FM.cc
Examining data/openmsx-16.0/src/memory/RomFactory.cc
Examining data/openmsx-16.0/src/memory/RomGameMaster2.cc
Examining data/openmsx-16.0/src/memory/RomGeneric16kB.cc
Examining data/openmsx-16.0/src/memory/RomGeneric8kB.cc
Examining data/openmsx-16.0/src/memory/RomHalnote.cc
Examining data/openmsx-16.0/src/memory/RomHarryFox.cc
Examining data/openmsx-16.0/src/memory/RomHolyQuran.cc
Examining data/openmsx-16.0/src/memory/RomHolyQuran2.cc
Examining data/openmsx-16.0/src/memory/RomInfo.cc
Examining data/openmsx-16.0/src/memory/RomInfoTopic.cc
Examining data/openmsx-16.0/src/memory/RomKonami.cc
Examining data/openmsx-16.0/src/memory/RomKonamiKeyboardMaster.cc
Examining data/openmsx-16.0/src/memory/RomKonamiSCC.cc
Examining data/openmsx-16.0/src/memory/RomMSXDOS2.cc
Examining data/openmsx-16.0/src/memory/RomMSXWrite.cc
Examining data/openmsx-16.0/src/memory/RomMSXtra.cc
Examining data/openmsx-16.0/src/memory/RomMajutsushi.cc
Examining data/openmsx-16.0/src/memory/RomManbow2.cc
Examining data/openmsx-16.0/src/memory/RomMatraCompilation.cc
Examining data/openmsx-16.0/src/memory/RomMatraInk.cc
Examining data/openmsx-16.0/src/memory/RomMitsubishiMLTS2.cc
Examining data/openmsx-16.0/src/memory/RomMultiRom.cc
Examining data/openmsx-16.0/src/memory/RomNational.cc
Examining data/openmsx-16.0/src/memory/RomNettouYakyuu.cc
Examining data/openmsx-16.0/src/memory/RomPadial16kB.cc
Examining data/openmsx-16.0/src/memory/RomPadial8kB.cc
Examining data/openmsx-16.0/src/memory/RomPageNN.cc
Examining data/openmsx-16.0/src/memory/RomPanasonic.cc
Examining data/openmsx-16.0/src/memory/RomPlain.cc
Examining data/openmsx-16.0/src/memory/RomPlayBall.cc
Examining data/openmsx-16.0/src/memory/RomRType.cc
Examining data/openmsx-16.0/src/memory/RomRamFile.cc
Examining data/openmsx-16.0/src/memory/RomSuperLodeRunner.cc
Examining data/openmsx-16.0/src/memory/RomSuperSwangi.cc
Examining data/openmsx-16.0/src/memory/RomSynthesizer.cc
Examining data/openmsx-16.0/src/memory/RomZemina126in1.cc
Examining data/openmsx-16.0/src/memory/RomZemina80in1.cc
Examining data/openmsx-16.0/src/memory/RomZemina90in1.cc
Examining data/openmsx-16.0/src/memory/SRAM.cc
Examining data/openmsx-16.0/src/memory/SdCard.cc
Examining data/openmsx-16.0/src/memory/TrackedRam.cc
Examining data/openmsx-16.0/src/security/SocketStreamWrapper.cc
Examining data/openmsx-16.0/src/security/SspiNegotiateServer.cc
Examining data/openmsx-16.0/src/security/SspiUtils.cc
Examining data/openmsx-16.0/src/serial/ClockPin.cc
Examining data/openmsx-16.0/src/serial/DummyMidiInDevice.cc
Examining data/openmsx-16.0/src/serial/DummyMidiOutDevice.cc
Examining data/openmsx-16.0/src/serial/DummyRS232Device.cc
Examining data/openmsx-16.0/src/serial/I8251.cc
Examining data/openmsx-16.0/src/serial/I8254.cc
Examining data/openmsx-16.0/src/serial/JVCMSXMIDI.cc
Examining data/openmsx-16.0/src/serial/MC6850.cc
Examining data/openmsx-16.0/src/serial/MSXFacMidiInterface.cc
Examining data/openmsx-16.0/src/serial/MSXMidi.cc
Examining data/openmsx-16.0/src/serial/MSXRS232.cc
Examining data/openmsx-16.0/src/serial/MidiInConnector.cc
Examining data/openmsx-16.0/src/serial/MidiInCoreMIDI.cc
Examining data/openmsx-16.0/src/serial/MidiInDevice.cc
Examining data/openmsx-16.0/src/serial/MidiInReader.cc
Examining data/openmsx-16.0/src/serial/MidiInWindows.cc
Examining data/openmsx-16.0/src/serial/MidiOutConnector.cc
Examining data/openmsx-16.0/src/serial/MidiOutCoreMIDI.cc
Examining data/openmsx-16.0/src/serial/MidiOutDevice.cc
Examining data/openmsx-16.0/src/serial/MidiOutLogger.cc
Examining data/openmsx-16.0/src/serial/MidiOutWindows.cc
Examining data/openmsx-16.0/src/serial/MidiSessionALSA.cc
Examining data/openmsx-16.0/src/serial/Midi_w32.cc
Examining data/openmsx-16.0/src/serial/MusicModuleMIDI.cc
Examining data/openmsx-16.0/src/serial/RS232Connector.cc
Examining data/openmsx-16.0/src/serial/RS232Device.cc
Examining data/openmsx-16.0/src/serial/RS232Tester.cc
Examining data/openmsx-16.0/src/serial/YM2148.cc
Examining data/openmsx-16.0/src/serialize.cc
Examining data/openmsx-16.0/src/serialize_core.cc
Examining data/openmsx-16.0/src/serialize_meta.cc
Examining data/openmsx-16.0/src/settings/BooleanSetting.cc
Examining data/openmsx-16.0/src/settings/EnumSetting.cc
Examining data/openmsx-16.0/src/settings/FilenameSetting.cc
Examining data/openmsx-16.0/src/settings/FloatSetting.cc
Examining data/openmsx-16.0/src/settings/IntegerSetting.cc
Examining data/openmsx-16.0/src/settings/KeyCodeSetting.cc
Examining data/openmsx-16.0/src/settings/ProxySetting.cc
Examining data/openmsx-16.0/src/settings/ReadOnlySetting.cc
Examining data/openmsx-16.0/src/settings/Setting.cc
Examining data/openmsx-16.0/src/settings/SettingsManager.cc
Examining data/openmsx-16.0/src/settings/StringSetting.cc
Examining data/openmsx-16.0/src/settings/UserSettings.cc
Examining data/openmsx-16.0/src/settings/VideoSourceSetting.cc
Examining data/openmsx-16.0/src/sound/AY8910.cc
Examining data/openmsx-16.0/src/sound/AY8910Periphery.cc
Examining data/openmsx-16.0/src/sound/AudioInputConnector.cc
Examining data/openmsx-16.0/src/sound/AudioInputDevice.cc
Examining data/openmsx-16.0/src/sound/BlipBuffer.cc
Examining data/openmsx-16.0/src/sound/DACSound16S.cc
Examining data/openmsx-16.0/src/sound/DACSound8U.cc
Examining data/openmsx-16.0/src/sound/DummyAudioInputDevice.cc
Examining data/openmsx-16.0/src/sound/DummyY8950KeyboardDevice.cc
Examining data/openmsx-16.0/src/sound/EmuTimer.cc
Examining data/openmsx-16.0/src/sound/KeyClick.cc
Examining data/openmsx-16.0/src/sound/MSXAudio.cc
Examining data/openmsx-16.0/src/sound/MSXFmPac.cc
Examining data/openmsx-16.0/src/sound/MSXMixer.cc
Examining data/openmsx-16.0/src/sound/MSXMoonSound.cc
Examining data/openmsx-16.0/src/sound/MSXMusic.cc
Examining data/openmsx-16.0/src/sound/MSXOPL3Cartridge.cc
Examining data/openmsx-16.0/src/sound/MSXPSG.cc
Examining data/openmsx-16.0/src/sound/MSXSCCPlusCart.cc
Examining data/openmsx-16.0/src/sound/MSXTurboRPCM.cc
Examining data/openmsx-16.0/src/sound/MSXYamahaSFG.cc
Examining data/openmsx-16.0/src/sound/Mixer.cc
Examining data/openmsx-16.0/src/sound/NullSoundDriver.cc
Examining data/openmsx-16.0/src/sound/ResampleBlip.cc
Examining data/openmsx-16.0/src/sound/ResampleHQ.cc
Examining data/openmsx-16.0/src/sound/ResampleLQ.cc
Examining data/openmsx-16.0/src/sound/ResampleTrivial.cc
Examining data/openmsx-16.0/src/sound/ResampledSoundDevice.cc
Examining data/openmsx-16.0/src/sound/SCC.cc
Examining data/openmsx-16.0/src/sound/SDLSoundDriver.cc
Examining data/openmsx-16.0/src/sound/SN76489.cc
Examining data/openmsx-16.0/src/sound/SNPSG.cc
Examining data/openmsx-16.0/src/sound/SVIPSG.cc
Examining data/openmsx-16.0/src/sound/SamplePlayer.cc
Examining data/openmsx-16.0/src/sound/SoundDevice.cc
Examining data/openmsx-16.0/src/sound/VLM5030.cc
Examining data/openmsx-16.0/src/sound/WavAudioInput.cc
Examining data/openmsx-16.0/src/sound/WavWriter.cc
Examining data/openmsx-16.0/src/sound/Y8950.cc
Examining data/openmsx-16.0/src/sound/Y8950Adpcm.cc
Examining data/openmsx-16.0/src/sound/Y8950KeyboardConnector.cc
Examining data/openmsx-16.0/src/sound/Y8950KeyboardDevice.cc
Examining data/openmsx-16.0/src/sound/Y8950Periphery.cc
Examining data/openmsx-16.0/src/sound/YM2151.cc
Examining data/openmsx-16.0/src/sound/YM2413.cc
Examining data/openmsx-16.0/src/sound/YM2413Burczynski.cc
Examining data/openmsx-16.0/src/sound/YM2413NukeYKT.cc
Examining data/openmsx-16.0/src/sound/YM2413Okazaki.cc
Examining data/openmsx-16.0/src/sound/YM2413OriginalNukeYKT.cc
Examining data/openmsx-16.0/src/sound/YM2413Test.cc
Examining data/openmsx-16.0/src/sound/YMF262.cc
Examining data/openmsx-16.0/src/sound/YMF278.cc
Examining data/openmsx-16.0/src/sound/generateNukeYktTables.cpp
Examining data/openmsx-16.0/src/sound/opll.cc
Examining data/openmsx-16.0/src/thread/Thread.cc
Examining data/openmsx-16.0/src/thread/Timer.cc
Examining data/openmsx-16.0/src/unittest/AdhocCliCommParser_test.cc
Examining data/openmsx-16.0/src/unittest/Base64_test.cc
Examining data/openmsx-16.0/src/unittest/CRC16_test.cc
Examining data/openmsx-16.0/src/unittest/CircularBuffer_test.cc
Examining data/openmsx-16.0/src/unittest/Date_test.cc
Examining data/openmsx-16.0/src/unittest/DivMod_test.cc
Examining data/openmsx-16.0/src/unittest/FixedPoint_test.cc
Examining data/openmsx-16.0/src/unittest/HexDump_test.cc
Examining data/openmsx-16.0/src/unittest/Keys_test.cc
Examining data/openmsx-16.0/src/unittest/Math_test.cc
Examining data/openmsx-16.0/src/unittest/MemoryBufferFile.cc
Examining data/openmsx-16.0/src/unittest/MemoryBufferFile_test.cc
Examining data/openmsx-16.0/src/unittest/ScopedAssign_test.cc
Examining data/openmsx-16.0/src/unittest/StringOp_test.cc
Examining data/openmsx-16.0/src/unittest/TclArgParser.cc
Examining data/openmsx-16.0/src/unittest/TclObject_test.cc
Examining data/openmsx-16.0/src/unittest/TigerTree_test.cc
Examining data/openmsx-16.0/src/unittest/WavData_test.cc
Examining data/openmsx-16.0/src/unittest/circular_buffer_test.cc
Examining data/openmsx-16.0/src/unittest/eeprom.cc
Examining data/openmsx-16.0/src/unittest/endian_test.cc
Examining data/openmsx-16.0/src/unittest/gl_mat.cc
Examining data/openmsx-16.0/src/unittest/gl_transform.cc
Examining data/openmsx-16.0/src/unittest/gl_vec.cc
Examining data/openmsx-16.0/src/unittest/join_test.cc
Examining data/openmsx-16.0/src/unittest/main.cc
Examining data/openmsx-16.0/src/unittest/semiregular_test.cc
Examining data/openmsx-16.0/src/unittest/sha1.cc
Examining data/openmsx-16.0/src/unittest/stl_test.cc
Examining data/openmsx-16.0/src/unittest/strCat.cc
Examining data/openmsx-16.0/src/unittest/view_test.cc
Examining data/openmsx-16.0/src/unittest/xrange_test.cc
Examining data/openmsx-16.0/src/utils/Base64.cc
Examining data/openmsx-16.0/src/utils/Date.cc
Examining data/openmsx-16.0/src/utils/DeltaBlock.cc
Examining data/openmsx-16.0/src/utils/DivModBySame.cc
Examining data/openmsx-16.0/src/utils/HexDump.cc
Examining data/openmsx-16.0/src/utils/MemoryOps.cc
Examining data/openmsx-16.0/src/utils/Poller.cc
Examining data/openmsx-16.0/src/utils/SerializeBuffer.cc
Examining data/openmsx-16.0/src/utils/StringOp.cc
Examining data/openmsx-16.0/src/utils/TigerTree.cc
Examining data/openmsx-16.0/src/utils/lz4.cc
Examining data/openmsx-16.0/src/utils/rapidsax.cc
Examining data/openmsx-16.0/src/utils/sha1.cc
Examining data/openmsx-16.0/src/utils/tiger.cc
Examining data/openmsx-16.0/src/utils/utf8_checked.cc
Examining data/openmsx-16.0/src/utils/win32-arggen.cc
Examining data/openmsx-16.0/src/utils/win32-dirent.cc
Examining data/openmsx-16.0/src/video/ADVram.cc
Examining data/openmsx-16.0/src/video/AviRecorder.cc
Examining data/openmsx-16.0/src/video/AviWriter.cc
Examining data/openmsx-16.0/src/video/BaseImage.cc
Examining data/openmsx-16.0/src/video/BitmapConverter.cc
Examining data/openmsx-16.0/src/video/CharacterConverter.cc
Examining data/openmsx-16.0/src/video/Deflicker.cc
Examining data/openmsx-16.0/src/video/DeinterlacedFrame.cc
Examining data/openmsx-16.0/src/video/Display.cc
Examining data/openmsx-16.0/src/video/DoubledFrame.cc
Examining data/openmsx-16.0/src/video/DummyRenderer.cc
Examining data/openmsx-16.0/src/video/DummyVideoSystem.cc
Examining data/openmsx-16.0/src/video/FBPostProcessor.cc
Examining data/openmsx-16.0/src/video/FrameSource.cc
Examining data/openmsx-16.0/src/video/GLContext.cc
Examining data/openmsx-16.0/src/video/GLImage.cc
Examining data/openmsx-16.0/src/video/GLPostProcessor.cc
Examining data/openmsx-16.0/src/video/GLSnow.cc
Examining data/openmsx-16.0/src/video/GLUtil.cc
Examining data/openmsx-16.0/src/video/Icon.cc
Examining data/openmsx-16.0/src/video/Layer.cc
Examining data/openmsx-16.0/src/video/OutputSurface.cc
Examining data/openmsx-16.0/src/video/PNG.cc
Examining data/openmsx-16.0/src/video/PixelRenderer.cc
Examining data/openmsx-16.0/src/video/PostProcessor.cc
Examining data/openmsx-16.0/src/video/RawFrame.cc
Examining data/openmsx-16.0/src/video/RenderSettings.cc
Examining data/openmsx-16.0/src/video/Renderer.cc
Examining data/openmsx-16.0/src/video/RendererFactory.cc
Examining data/openmsx-16.0/src/video/SDLGLOffScreenSurface.cc
Examining data/openmsx-16.0/src/video/SDLGLVisibleSurface.cc
Examining data/openmsx-16.0/src/video/SDLImage.cc
Examining data/openmsx-16.0/src/video/SDLOffScreenSurface.cc
Examining data/openmsx-16.0/src/video/SDLOutputSurface.cc
Examining data/openmsx-16.0/src/video/SDLRasterizer.cc
Examining data/openmsx-16.0/src/video/SDLSnow.cc
Examining data/openmsx-16.0/src/video/SDLVideoSystem.cc
Examining data/openmsx-16.0/src/video/SDLVisibleSurface.cc
Examining data/openmsx-16.0/src/video/SDLVisibleSurfaceBase.cc
Examining data/openmsx-16.0/src/video/SpriteChecker.cc
Examining data/openmsx-16.0/src/video/SuperImposedFrame.cc
Examining data/openmsx-16.0/src/video/SuperImposedVideoFrame.cc
Examining data/openmsx-16.0/src/video/VDP.cc
Examining data/openmsx-16.0/src/video/VDPAccessSlots.cc
Examining data/openmsx-16.0/src/video/VDPCmdEngine.cc
Examining data/openmsx-16.0/src/video/VDPVRAM.cc
Examining data/openmsx-16.0/src/video/VideoLayer.cc
Examining data/openmsx-16.0/src/video/VideoSystem.cc
Examining data/openmsx-16.0/src/video/VisibleSurface.cc
Examining data/openmsx-16.0/src/video/ZMBVEncoder.cc
Examining data/openmsx-16.0/src/video/ld/LDDummyRenderer.cc
Examining data/openmsx-16.0/src/video/ld/LDPixelRenderer.cc
Examining data/openmsx-16.0/src/video/ld/LDSDLRasterizer.cc
Examining data/openmsx-16.0/src/video/scalers/DirectScalerOutput.cc
Examining data/openmsx-16.0/src/video/scalers/GLDefaultScaler.cc
Examining data/openmsx-16.0/src/video/scalers/GLHQLiteScaler.cc
Examining data/openmsx-16.0/src/video/scalers/GLHQScaler.cc
Examining data/openmsx-16.0/src/video/scalers/GLRGBScaler.cc
Examining data/openmsx-16.0/src/video/scalers/GLSaIScaler.cc
Examining data/openmsx-16.0/src/video/scalers/GLScaleNxScaler.cc
Examining data/openmsx-16.0/src/video/scalers/GLScaler.cc
Examining data/openmsx-16.0/src/video/scalers/GLScalerFactory.cc
Examining data/openmsx-16.0/src/video/scalers/GLSimpleScaler.cc
Examining data/openmsx-16.0/src/video/scalers/GLTVScaler.cc
Examining data/openmsx-16.0/src/video/scalers/HQ2xLiteScaler.cc
Examining data/openmsx-16.0/src/video/scalers/HQ2xScaler.cc
Examining data/openmsx-16.0/src/video/scalers/HQ3xLiteScaler.cc
Examining data/openmsx-16.0/src/video/scalers/HQ3xScaler.cc
Examining data/openmsx-16.0/src/video/scalers/MLAAScaler.cc
Examining data/openmsx-16.0/src/video/scalers/Multiply32.cc
Examining data/openmsx-16.0/src/video/scalers/RGBTriplet3xScaler.cc
Examining data/openmsx-16.0/src/video/scalers/SaI2xScaler.cc
Examining data/openmsx-16.0/src/video/scalers/SaI3xScaler.cc
Examining data/openmsx-16.0/src/video/scalers/Scale2xScaler.cc
Examining data/openmsx-16.0/src/video/scalers/Scale3xScaler.cc
Examining data/openmsx-16.0/src/video/scalers/Scaler1.cc
Examining data/openmsx-16.0/src/video/scalers/Scaler2.cc
Examining data/openmsx-16.0/src/video/scalers/Scaler3.cc
Examining data/openmsx-16.0/src/video/scalers/ScalerFactory.cc
Examining data/openmsx-16.0/src/video/scalers/Scanline.cc
Examining data/openmsx-16.0/src/video/scalers/Simple2xScaler.cc
Examining data/openmsx-16.0/src/video/scalers/Simple3xScaler.cc
Examining data/openmsx-16.0/src/video/scalers/StretchScalerOutput.cc
Examining data/openmsx-16.0/src/video/scalers/SuperImposeScalerOutput.cc
Examining data/openmsx-16.0/src/video/v9990/V9990.cc
Examining data/openmsx-16.0/src/video/v9990/V9990BitmapConverter.cc
Examining data/openmsx-16.0/src/video/v9990/V9990CmdEngine.cc
Examining data/openmsx-16.0/src/video/v9990/V9990DummyRenderer.cc
Examining data/openmsx-16.0/src/video/v9990/V9990PixelRenderer.cc
Examining data/openmsx-16.0/src/video/v9990/V9990PxConverter.cc
Examining data/openmsx-16.0/src/video/v9990/V9990SDLRasterizer.cc
Examining data/openmsx-16.0/src/video/v9990/V9990VRAM.cc
Examining data/openmsx-16.0/src/video/v9990/Video9000.cc

FINAL RESULTS:

data/openmsx-16.0/src/events/CliServer.cc:168:6:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	if (chmod(socketName.c_str(), 0600) == -1) {
data/openmsx-16.0/Contrib/openmsx-control-socket.cc:481:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(addr.sun_path, socketName.c_str());
data/openmsx-16.0/Contrib/openmsx-control-stdio.cc:376:3:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execlp("openmsx", "openmsx", "-control", "stdio:", 0);
data/openmsx-16.0/src/fdc/NowindHost.cc:33:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(message, args);
data/openmsx-16.0/src/input/Keyboard.cc:937:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stderr, format, args);
data/openmsx-16.0/src/memory/RomDatabase.cc:96:14:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	string_view system;
data/openmsx-16.0/Contrib/catch2/catch.hpp:4498:1:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
random(T a, T b) {
data/openmsx-16.0/Contrib/catch2/catch.hpp:4507:1:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
random(T a, T b) {
data/openmsx-16.0/Contrib/catch2/catch.hpp:11724:18:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            std::srand( config.rngSeed() );
data/openmsx-16.0/Contrib/openmsx-control-socket.cc:65:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (!result) result = getenv("TMPDIR");
data/openmsx-16.0/Contrib/openmsx-control-socket.cc:66:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (!result) result = getenv("TMP");
data/openmsx-16.0/Contrib/openmsx-control-socket.cc:67:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (!result) result = getenv("TEMP");
data/openmsx-16.0/src/fdc/MSXtar.cc:718:2:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
	chroot(newRootDir, false);
data/openmsx-16.0/src/fdc/MSXtar.cc:724:2:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
	chroot(newRootDir, true);
data/openmsx-16.0/src/fdc/MSXtar.cc:728:14:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
void MSXtar::chroot(string_view newRootDir, bool createDir)
data/openmsx-16.0/src/file/FileOperations.cc:530:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		dir = getenv("HOME");
data/openmsx-16.0/src/file/FileOperations.cc:561:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char* value = getenv(NAME);
data/openmsx-16.0/src/file/FileOperations.cc:568:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (char* value = getenv(NAME)) {
data/openmsx-16.0/src/file/FileOperations.cc:783:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (!result) result = getenv("TMPDIR");
data/openmsx-16.0/src/file/FileOperations.cc:784:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (!result) result = getenv("TMP");
data/openmsx-16.0/src/file/FileOperations.cc:785:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (!result) result = getenv("TEMP");
data/openmsx-16.0/src/main.cc:48:20:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		char* oldvalue = getenv(name);
data/openmsx-16.0/src/security/SspiUtils.cc:188:8:  [3] (misc) AddAccessAllowedAce:
  This doesn't set the inheritance bits in the access control entry (ACE)
  header (CWE-732). Make sure that you set inheritance by hand if you wish it
  to inherit.
			    AddAccessAllowedAce(pacl, ACL_REVISION, ACCESS_ALL, pUserSid) &&
data/openmsx-16.0/src/sound/AY8910.cc:238:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	random = (random >> 1) ^ ((random & 1) << 13) ^ ((random & 1) << 16);
data/openmsx-16.0/src/sound/AY8910.cc:238:29:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	random = (random >> 1) ^ ((random & 1) << 13) ^ ((random & 1) << 16);
data/openmsx-16.0/src/sound/AY8910.cc:238:52:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	random = (random >> 1) ^ ((random & 1) << 13) ^ ((random & 1) << 16);
data/openmsx-16.0/src/sound/AY8910.cc:253:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		random = ((random & 0x1f) << 12)
data/openmsx-16.0/src/sound/AY8910.cc:254:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ((random & 0x1f) <<  9)
data/openmsx-16.0/src/sound/AY8910.cc:255:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^   random
data/openmsx-16.0/src/sound/AY8910.cc:256:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ( random         >>  5);
data/openmsx-16.0/src/sound/AY8910.cc:259:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		random = ((random & 0x03f) << 11)
data/openmsx-16.0/src/sound/AY8910.cc:260:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ((random & 0x1c0) <<  8)
data/openmsx-16.0/src/sound/AY8910.cc:261:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ((random & 0x1ff) <<  5)
data/openmsx-16.0/src/sound/AY8910.cc:262:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^   random
data/openmsx-16.0/src/sound/AY8910.cc:263:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ( random          >>  6)
data/openmsx-16.0/src/sound/AY8910.cc:264:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ( random          >>  9);
data/openmsx-16.0/src/sound/AY8910.cc:267:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		random = ((random & 0xfff) <<  5)
data/openmsx-16.0/src/sound/AY8910.cc:268:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ((random & 0xfff) <<  2)
data/openmsx-16.0/src/sound/AY8910.cc:269:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^   random
data/openmsx-16.0/src/sound/AY8910.cc:270:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ( random          >> 12);
data/openmsx-16.0/src/sound/AY8910.cc:273:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		random = ((random & 0xff) << 9)
data/openmsx-16.0/src/sound/AY8910.cc:274:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ((random & 0xff) << 6)
data/openmsx-16.0/src/sound/AY8910.cc:275:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ( random         >> 8);
data/openmsx-16.0/src/sound/AY8910.cc:278:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		random = ((random & 1) << 16)
data/openmsx-16.0/src/sound/AY8910.cc:279:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ((random & 1) << 13)
data/openmsx-16.0/src/sound/AY8910.cc:280:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		       ^ ( random      >>  1);
data/openmsx-16.0/src/sound/AY8910.cc:1062:25:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	ar.serialize("random", random);
data/openmsx-16.0/src/sound/SN76489.cc:37:10:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	return ~random & 1;
data/openmsx-16.0/src/sound/SN76489.cc:42:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	random = (random >> 1) ^ ((random & 1) ? pattern : 0);
data/openmsx-16.0/src/sound/SN76489.cc:42:29:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	random = (random >> 1) ^ ((random & 1) ? pattern : 0);
data/openmsx-16.0/src/sound/SN76489.cc:70:25:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	ar.serialize("random", random);
data/openmsx-16.0/Contrib/base64.cc:50:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE* inf = fopen(argv[1], "rb");
data/openmsx-16.0/Contrib/base64.cc:75:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE* outf = fopen(argv[2], "wb+");
data/openmsx-16.0/Contrib/catch2/catch.hpp:2128:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char timeStamp[timeStampSize];
data/openmsx-16.0/Contrib/catch2/catch.hpp:4361:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        alignas(alignof(T)) char storage[sizeof(T)];
data/openmsx-16.0/Contrib/catch2/catch.hpp:5763:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
data/openmsx-16.0/Contrib/catch2/catch.hpp:7282:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        void open();
data/openmsx-16.0/Contrib/catch2/catch.hpp:11056:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &f, sizeof(f));
data/openmsx-16.0/Contrib/catch2/catch.hpp:11065:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &d, sizeof(d));
data/openmsx-16.0/Contrib/catch2/catch.hpp:11523:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char m_buffer[L_tmpnam] = { 0 };
data/openmsx-16.0/Contrib/catch2/catch.hpp:11610:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buffer[100];
data/openmsx-16.0/Contrib/catch2/catch.hpp:11619:23:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        m_file = std::tmpfile();
data/openmsx-16.0/Contrib/catch2/catch.hpp:11643:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[100] = {};
data/openmsx-16.0/Contrib/catch2/catch.hpp:12065:30:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                    tracker->open();
data/openmsx-16.0/Contrib/catch2/catch.hpp:12845:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char **utf8Argv = new char *[ argc ];
data/openmsx-16.0/Contrib/catch2/catch.hpp:13004:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char data[bufferSize];
data/openmsx-16.0/Contrib/catch2/catch.hpp:13053:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
                m_ofs.open( filename.c_str() );
data/openmsx-16.0/Contrib/catch2/catch.hpp:13302:13:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            memcpy( m_data, m_start, m_size );
data/openmsx-16.0/Contrib/catch2/catch.hpp:13823:23:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void TrackerBase::open() {
data/openmsx-16.0/Contrib/catch2/catch.hpp:13923:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            open();
data/openmsx-16.0/Contrib/catch2/catch.hpp:14299:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                    char asChar[sizeof (int)];
data/openmsx-16.0/Contrib/catch2/catch.hpp:14968:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buffer[maxDoubleSize];
data/openmsx-16.0/Contrib/catch2/catch.hpp:14975:14:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        std::sprintf(buffer, "%.3f", duration);
data/openmsx-16.0/Contrib/catch2/catch.hpp:15568:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open() {
data/openmsx-16.0/Contrib/catch2/catch.hpp:15603:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        tp.open();
data/openmsx-16.0/Contrib/catch2/catch.hpp:15980:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char timeStamp[timeStampSize];
data/openmsx-16.0/Contrib/dmk/analyze-dmk.cc:29:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		: f(fopen(filename.c_str(), mode))
data/openmsx-16.0/Contrib/dmk/combine-dmk.cc:229:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			FILE* file = fopen(name.c_str(), "rb");
data/openmsx-16.0/Contrib/dmk/combine-dmk.cc:269:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			FILE* file = fopen(name.c_str(), "rb");
data/openmsx-16.0/Contrib/dmk/combine-dmk.cc:305:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE* file = fopen("out.dmk", "wb+");
data/openmsx-16.0/Contrib/dmk/der2dmk.cc:45:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		: f(fopen(filename.c_str(), mode))
data/openmsx-16.0/Contrib/dmk/der2dmk.cc:108:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char derHeader[20];
data/openmsx-16.0/Contrib/dmk/dsk2dmk.cc:45:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		: f(fopen(filename.c_str(), mode))
data/openmsx-16.0/Contrib/dmk/empty-dmk.cc:31:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE* f = fopen(argv[1], "wb");
data/openmsx-16.0/Contrib/dmk/svi2dmk.cc:36:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		: f(fopen(filename, mode))
data/openmsx-16.0/Contrib/dmk/svicpm2dmk.cc:44:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		: f(fopen(filename.c_str(), mode))
data/openmsx-16.0/Contrib/openmsx-control-socket.cc:333:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[4096];
data/openmsx-16.0/Contrib/openmsx-control-stdio.cc:390:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[4096];
data/openmsx-16.0/src/EmptyPatch.cc:23:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(dst, &block[src], part1);
data/openmsx-16.0/src/EmptyPatch.cc:30:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(dst, &block[src], num);
data/openmsx-16.0/src/IPSPatch.cc:63:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(&tmp[it->first - start], &it->second[0],
data/openmsx-16.0/src/IPSPatch.cc:66:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(&tmp[offset - start], v.data(), v.size());
data/openmsx-16.0/src/IPSPatch.cc:120:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst + chunkStart - src, &it->second[chunkOffset],
data/openmsx-16.0/src/Printer.cc:693:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(fontInfo.rom, MSXFont, sizeof(MSXFont));
data/openmsx-16.0/src/Printer.cc:1237:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(fontInfo.rom, EpsonFontRom, sizeof(EpsonFontRom));
data/openmsx-16.0/src/cpu/CPUCore.cc:520:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tmp[3]; tmp[2] = 0;
data/openmsx-16.0/src/events/CliConnection.cc:183:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[BUF_SIZE];
data/openmsx-16.0/src/events/CliConnection.cc:265:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[BUF_SIZE];
data/openmsx-16.0/src/events/CliConnection.cc:352:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[BUF_SIZE];
data/openmsx-16.0/src/fdc/DirAsDSK.cc:237:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(result.data() + 0, file.data(), std::min<size_t>(8, file.size()));
data/openmsx-16.0/src/fdc/DirAsDSK.cc:238:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(result.data() + 8, ext .data(), std::min<size_t>(3, ext .size()));
data/openmsx-16.0/src/fdc/DirAsDSK.cc:295:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&sectors[0], &protoBootSector, sizeof(protoBootSector));
data/openmsx-16.0/src/fdc/DirAsDSK.cc:831:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(msxDir(dirIndex).filename, msxFilename.data(), 8 + 3);
data/openmsx-16.0/src/fdc/DirAsDSK.cc:906:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&sectors[sector], &buf, sizeof(buf));
data/openmsx-16.0/src/fdc/DirAsDSK.cc:919:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&oldFAT[0], fat(), SECTOR_SIZE * nofSectorsPerFat);
data/openmsx-16.0/src/fdc/DirAsDSK.cc:922:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&sectors[sector], &buf, sizeof(buf));
data/openmsx-16.0/src/fdc/DirAsDSK.cc:1318:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&msxDir(dirIndex), &newEntry, sizeof(newEntry));
data/openmsx-16.0/src/fdc/DirAsDSK.cc:1330:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&sectors[sector], &buf, sizeof(buf));
data/openmsx-16.0/src/fdc/DiskImageUtils.cc:13:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
constexpr char PARTAB_HEADER[11] = {
data/openmsx-16.0/src/fdc/DiskImageUtils.cc:231:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf.pt.header, PARTAB_HEADER, sizeof(PARTAB_HEADER));
data/openmsx-16.0/src/fdc/MSXFDC.cc:76:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tag[7] = { 'd', 'r', 'i', 'v', 'e', 'X', 0 };
data/openmsx-16.0/src/fdc/MSXtar.cc:114:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&fatBuffer[fatSector], &buf, sizeof(buf));
data/openmsx-16.0/src/fdc/MSXtar.cc:341:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(result.data(), fullFile.data(), fullFile.size());
data/openmsx-16.0/src/fdc/MSXtar.cc:358:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(result.data() + 0, fileS.data(), fileS.size());
data/openmsx-16.0/src/fdc/MSXtar.cc:359:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(result.data() + 8, extS .data(), extS .size());
data/openmsx-16.0/src/fdc/MSXtar.cc:382:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&dirEntry, makeSimpleMSXFileName(msxName).data(), 11);
data/openmsx-16.0/src/fdc/MSXtar.cc:583:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&dirEntry, msxName.data(), 11);
data/openmsx-16.0/src/fdc/NowindHost.cc:630:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		devices[dev].fs->open(filename.c_str(), ios::in  | ios::binary);
data/openmsx-16.0/src/fdc/NowindHost.cc:634:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		devices[dev].fs->open(filename.c_str(), ios::out | ios::binary);
data/openmsx-16.0/src/fdc/NowindHost.cc:638:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		devices[dev].fs->open(filename.c_str(), ios::out | ios::binary | ios::app);
data/openmsx-16.0/src/fdc/NowindHost.cc:657:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256];
data/openmsx-16.0/src/fdc/NowindHost.cc:704:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256];
data/openmsx-16.0/src/fdc/NowindHost.cc:796:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(bufRaw, tmp.data(), bufSize);
data/openmsx-16.0/src/fdc/RamDSKDiskImage.cc:23:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&data[sector], &buf, sizeof(buf));
data/openmsx-16.0/src/file/CompressedFileAdapter.cc:62:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buffer, buf.data() + pos, num);
data/openmsx-16.0/src/file/FileOperations.cc:363:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	return FILE_t(fopen(filename.c_str(), mode.c_str()));
data/openmsx-16.0/src/file/FileOperations.cc:372:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	stream.open(utf8to16(filename).c_str());
data/openmsx-16.0/src/file/FileOperations.cc:374:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	stream.open(filename.c_str());
data/openmsx-16.0/src/file/FileOperations.cc:384:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	stream.open(utf8to16(filename).c_str(), mode);
data/openmsx-16.0/src/file/FileOperations.cc:386:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	stream.open(filename.c_str(), mode);
data/openmsx-16.0/src/file/FileOperations.cc:473:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t bufW[MAXPATHLEN];
data/openmsx-16.0/src/file/FileOperations.cc:480:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[MAXPATHLEN];
data/openmsx-16.0/src/file/FileOperations.cc:519:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t bufW[MAXPATHLEN + 1];
data/openmsx-16.0/src/file/FileOperations.cc:574:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t bufW[MAXPATHLEN + 1];
data/openmsx-16.0/src/file/FileOperations.cc:617:4:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			wchar_t bufW[MAXPATHLEN + 1];
data/openmsx-16.0/src/file/FileOperations.cc:797:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t filenameW[MAX_PATH];
data/openmsx-16.0/src/file/FileOperations.cc:806:11:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	int fd = mkstemp(const_cast<char*>(filename.c_str()));
data/openmsx-16.0/src/file/PreCacheFile.cc:44:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char buf[BLOCK_SIZE];
data/openmsx-16.0/src/ide/MB89352.cc:755:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tag[8] = { 'd', 'e', 'v', 'i', 'c', 'e', 'X', 0 };
data/openmsx-16.0/src/ide/SCSIHD.cc:114:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buffer + 2, inqdata + 2, 34);
data/openmsx-16.0/src/ide/SCSIHD.cc:147:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buffer + 36, imageName.data(), 20);
data/openmsx-16.0/src/ide/SCSILS120.cc:78:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
constexpr char fds120[28 + 1]  = "IODATA  LS-120 COSM     0001";
data/openmsx-16.0/src/ide/SCSILS120.cc:205:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buffer + 2, inqdata + 2, 6);
data/openmsx-16.0/src/ide/SCSILS120.cc:206:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buffer + 8, fds120, 28);
data/openmsx-16.0/src/ide/SCSILS120.cc:208:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buffer + 2, inqdata + 2, 34);
data/openmsx-16.0/src/ide/SCSILS120.cc:241:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buffer + 36, filename.data(), 20);
data/openmsx-16.0/src/ide/WD33C93.cc:461:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tag[8] = { 'd', 'e', 'v', 'i', 'c', 'e', 'X', 0 };
data/openmsx-16.0/src/input/JoyTap.cc:78:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tag[6] = { 'p', 'o', 'r', 't', 'X', 0 };
data/openmsx-16.0/src/laserdisc/OggReader.cc:381:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(audio->pcm[0] + audio->length, pcm[0] + pos,
data/openmsx-16.0/src/laserdisc/OggReader.cc:383:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(audio->pcm[1] + audio->length, pcm[1] + pos,
data/openmsx-16.0/src/laserdisc/OggReader.cc:456:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			int chapter = atoi(p + 9);
data/openmsx-16.0/src/laserdisc/OggReader.cc:460:19:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			size_t frame = atol(p);
data/openmsx-16.0/src/laserdisc/OggReader.cc:465:23:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			size_t stopframe = atol(p + 6);
data/openmsx-16.0/src/laserdisc/OggReader.cc:581:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(frame->buffer[0].data, yuv[0].data, y_size);
data/openmsx-16.0/src/laserdisc/OggReader.cc:582:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(frame->buffer[1].data, yuv[1].data, uv_size);
data/openmsx-16.0/src/laserdisc/OggReader.cc:583:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(frame->buffer[2].data, yuv[2].data, uv_size);
data/openmsx-16.0/src/memory/AmdFlash.cc:162:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(ramPtr, romPtr, last);
data/openmsx-16.0/src/memory/AmdFlash.cc:167:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(ramPtr, romPtr, sectorSize);
data/openmsx-16.0/src/memory/Ram.cc:75:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ram.data(), buf.data(), done);
data/openmsx-16.0/src/memory/Ram.cc:85:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(&ram[done], &ram[0], tmp);
data/openmsx-16.0/src/memory/Rom.cc:378:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(newData, rom, size);
data/openmsx-16.0/src/memory/RomDatabase.cc:499:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[12];
data/openmsx-16.0/src/memory/RomDatabase.cc:502:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(buf, t.data(), 8);
data/openmsx-16.0/src/memory/RomDatabase.cc:503:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(buf + 8, s, 4);
data/openmsx-16.0/src/memory/RomDatabase.cc:508:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(buf, t.data(), 6);
data/openmsx-16.0/src/memory/RomDatabase.cc:509:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(buf + 6, s, 4);
data/openmsx-16.0/src/serial/I8254.cc:540:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tag[9] = { 'c', 'o', 'u', 'n', 't', 'e', 'r', 'X', 0 };
data/openmsx-16.0/src/serial/Midi_w32.cc:58:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char     vfname[MAXPATHLEN + 1];
data/openmsx-16.0/src/serial/Midi_w32.cc:59:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char     devname[MAXPNAMELEN];
data/openmsx-16.0/src/serial/Midi_w32.cc:74:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char inlongmes[OPENMSX_W32_MIDI_SYSMES_MAXLEN];
data/openmsx-16.0/src/serialize.cc:178:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, &size, sizeof(size));
data/openmsx-16.0/src/serialize.cc:179:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + sizeof(size), s.data(), size);
data/openmsx-16.0/src/serialize.cc:230:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf, data, len);
data/openmsx-16.0/src/serialize.cc:250:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(data, buffer.getCurrentPos(), len);
data/openmsx-16.0/src/settings/SettingsManager.cc:70:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&fullname[0],             prefix  .data(), prefix  .size());
data/openmsx-16.0/src/settings/SettingsManager.cc:71:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&fullname[prefix.size()], baseName.data(), baseName.size());
data/openmsx-16.0/src/sound/ResampleHQ.cc:626:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&buffer[bufEnd * CHANNELS], tmpBuf,
data/openmsx-16.0/src/sound/SCC.cc:565:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tag[6] = { 'w', 'a', 'v', 'e', 'X', 0 };
data/openmsx-16.0/src/sound/SDLSoundDriver.cc:116:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(stream, &mixBuffer[readIdx], num * sizeof(float));
data/openmsx-16.0/src/sound/SDLSoundDriver.cc:120:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(stream, &mixBuffer[readIdx], len1 * sizeof(float));
data/openmsx-16.0/src/sound/SDLSoundDriver.cc:122:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&stream[len1], &mixBuffer[0], len2 * sizeof(float));
data/openmsx-16.0/src/sound/SDLSoundDriver.cc:155:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&mixBuffer[writeIdx], buffer, len * sizeof(float));
data/openmsx-16.0/src/sound/SDLSoundDriver.cc:159:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&mixBuffer[writeIdx], buffer, len1 * sizeof(float));
data/openmsx-16.0/src/sound/SDLSoundDriver.cc:161:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&mixBuffer[0], &buffer[len1], len2 * sizeof(float));
data/openmsx-16.0/src/sound/WavWriter.cc:19:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char        chunkID[4];     // + 0 'RIFF'
data/openmsx-16.0/src/sound/WavWriter.cc:21:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char        format[4];      // + 8 'WAVE'
data/openmsx-16.0/src/sound/WavWriter.cc:22:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char        subChunk1ID[4]; // +12 'fmt '
data/openmsx-16.0/src/sound/WavWriter.cc:30:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char        subChunk2ID[4]; // +36 'data'
data/openmsx-16.0/src/sound/YM2413Burczynski.cc:340:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
constexpr signed char lfo_pm_table[8][8] =
data/openmsx-16.0/src/sound/YM2413Okazaki.cc:79:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
constexpr signed char pmTable[8][8] =
data/openmsx-16.0/src/sound/YM2413Okazaki.cc:92:20:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
constexpr unsigned char lfo_am_table[LFO_AM_TAB_ELEMENTS] = {
data/openmsx-16.0/src/sound/YMF262.cc:322:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
constexpr signed char lfo_pm_table[8 * 8 * 2] = {
data/openmsx-16.0/src/unittest/MemoryBufferFile.cc:14:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(dst, buffer.data() + pos, num);
data/openmsx-16.0/src/unittest/strCat.cc:25:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[100]; buf[0] = 'q'; buf[1] = 'u'; buf[2] = 'x'; buf[3] = '\0';
data/openmsx-16.0/src/unittest/strCat.cc:120:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[100]; buf[0] = 'd'; buf[1] = 'e'; buf[2] = '\0'; buf[3] = 'f';
data/openmsx-16.0/src/utils/DeltaBlock.cc:234:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf, delta, n2);
data/openmsx-16.0/src/utils/DeltaBlock.cc:262:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(block.data(), data, size);
data/openmsx-16.0/src/utils/DeltaBlock.cc:277:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst, block.data(), size);
data/openmsx-16.0/src/utils/SerializeBuffer.cc:36:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(end, data, LEN);
data/openmsx-16.0/src/utils/SerializeBuffer.cc:53:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(end, data, len);
data/openmsx-16.0/src/utils/SerializeBuffer.cc:91:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(pos, data, len);
data/openmsx-16.0/src/utils/lz4.cc:62:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst, src, 8);
data/openmsx-16.0/src/utils/lz4.cc:74:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst +  0, src +  0, 16);
data/openmsx-16.0/src/utils/lz4.cc:75:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst + 16, src + 16, 16);
data/openmsx-16.0/src/utils/lz4.cc:92:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dstPtr + 4, srcPtr, 4);
data/openmsx-16.0/src/utils/lz4.cc:96:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dstPtr, srcPtr, 8);
data/openmsx-16.0/src/utils/lz4.cc:118:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(v, srcPtr, 2);
data/openmsx-16.0/src/utils/lz4.cc:119:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(&v[2], srcPtr, 2);
data/openmsx-16.0/src/utils/lz4.cc:120:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(&v[4], &v[0], 4);
data/openmsx-16.0/src/utils/lz4.cc:123:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(v, srcPtr, 4);
data/openmsx-16.0/src/utils/lz4.cc:124:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(&v[4], srcPtr, 4);
data/openmsx-16.0/src/utils/lz4.cc:131:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(dstPtr, v, 8);
data/openmsx-16.0/src/utils/lz4.cc:134:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dstPtr, v, 8);
data/openmsx-16.0/src/utils/lz4.cc:509:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(op, anchor, lastRun);
data/openmsx-16.0/src/utils/lz4.cc:584:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(op, ip, 16);
data/openmsx-16.0/src/utils/lz4.cc:612:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(op +  0, match +  0, 8);
data/openmsx-16.0/src/utils/lz4.cc:613:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(op +  8, match +  8, 8);
data/openmsx-16.0/src/utils/lz4.cc:614:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(op + 16, match + 16, 2);
data/openmsx-16.0/src/utils/lz4.cc:651:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(op, ip, 16);
data/openmsx-16.0/src/utils/lz4.cc:665:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(op +  0, match +  0, 8);
data/openmsx-16.0/src/utils/lz4.cc:666:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(op +  8, match +  8, 8);
data/openmsx-16.0/src/utils/lz4.cc:667:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(op + 16, match + 16, 2);
data/openmsx-16.0/src/utils/lz4.cc:726:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(op + 4, match, 4);
data/openmsx-16.0/src/utils/lz4.cc:729:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(op, match, 8);
data/openmsx-16.0/src/utils/lz4.cc:745:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(op, match, 8);
data/openmsx-16.0/src/utils/sha1.cc:234:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[40];
data/openmsx-16.0/src/utils/sha1.cc:327:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&m_buffer[j], data, (i = 64 - j));
data/openmsx-16.0/src/utils/sha1.cc:336:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&m_buffer[j], &data[i], len - i);
data/openmsx-16.0/src/utils/tiger.cc:721:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + 1,      h0.h64, 24);
data/openmsx-16.0/src/utils/tiger.cc:722:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + 1 + 24, h1.h64, 24);
data/openmsx-16.0/src/utils/utf8_checked.cc:13:12:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
	int len = MultiByteToWideChar(cp, dwFlags, multibyteA, -1, nullptr, 0);
data/openmsx-16.0/src/utils/utf8_checked.cc:16:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
		len = MultiByteToWideChar(cp, dwFlags, multibyteA, -1, utf16W, len);
data/openmsx-16.0/src/utils/win32-dirent.cc:59:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(dir->data, &find, sizeof(find));
data/openmsx-16.0/src/video/AviWriter.cc:56:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&avi_header[header_pos], s, 4);
data/openmsx-16.0/src/video/AviWriter.cc:69:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&avi_header[header_pos], s, len1);
data/openmsx-16.0/src/video/AviWriter.cc:191:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char dateStr[size];
data/openmsx-16.0/src/video/AviWriter.cc:244:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char t[4];
data/openmsx-16.0/src/video/AviWriter.cc:258:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&index[idxSize], tag, sizeof(Endian::L32));
data/openmsx-16.0/src/video/FBPostProcessor.cc:27:38:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
alignas(SSE_ALIGNMENT) static signed char noiseBuf[NOISE_BUF_SIZE];
data/openmsx-16.0/src/video/FrameSource.cc:83:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(tmpBuf, in, inWidth * sizeof(Pixel));
data/openmsx-16.0/src/video/GLPostProcessor.cc:348:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(dest, data, lineWidth * sizeof(uint32_t));
data/openmsx-16.0/src/video/PNG.cc:338:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char timeStr[size];
data/openmsx-16.0/src/video/PNG.cc:389:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(surface.getLinePtr(y),
data/openmsx-16.0/src/video/SDLRasterizer.cc:580:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(dst, src, firstPageWidth * sizeof(Pixel));
data/openmsx-16.0/src/video/SDLRasterizer.cc:591:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(dst + firstPageWidth,
data/openmsx-16.0/src/video/SDLRasterizer.cc:611:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(dst, src, displayWidth * sizeof(Pixel));
data/openmsx-16.0/src/video/SDLSnow.cc:39:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(p1, p0, width * sizeof(Pixel));
data/openmsx-16.0/src/video/VDP.cc:299:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(palette, V9938_PALETTE, sizeof(V9938_PALETTE));
data/openmsx-16.0/src/video/VDPVRAM.cc:292:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(dst, src, 64);
data/openmsx-16.0/src/video/VDPVRAM.cc:302:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(dst, src, 64);
data/openmsx-16.0/src/video/VDPVRAM.cc:305:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&data[0], tmp, sizeof(tmp));
data/openmsx-16.0/src/video/ZMBVEncoder.cc:379:23:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		if (scaled != dest) memcpy(dest, scaled, lineWidth);
data/openmsx-16.0/src/video/scalers/GLHQLiteScaler.cc:119:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(mapped + 320 * y, tmpBuf2, 320 * sizeof(uint16_t));
data/openmsx-16.0/src/video/scalers/GLHQScaler.cc:133:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(mapped + 320 * y, tmpBuf2, 320 * sizeof(uint16_t));
data/openmsx-16.0/Contrib/catch2/catch.hpp:3625:29:  [1] (buffer) is_permutation:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                return std::is_permutation(m_target.begin(), m_target.end(), vec.begin());
data/openmsx-16.0/Contrib/catch2/catch.hpp:12874:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/openmsx-16.0/Contrib/catch2/catch.hpp:12879:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/openmsx-16.0/Contrib/catch2/catch.hpp:13176:50:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());
data/openmsx-16.0/Contrib/catch2/catch.hpp:13182:50:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());
data/openmsx-16.0/Contrib/catch2/catch.hpp:13268:67:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )
data/openmsx-16.0/Contrib/dmk/analyze-dmk.cc:41:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	void read(void* data, int size)
data/openmsx-16.0/Contrib/dmk/analyze-dmk.cc:209:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	inf.read(&header, sizeof(header));
data/openmsx-16.0/Contrib/dmk/analyze-dmk.cc:236:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			inf.read(&buffer[0], dmkTrackLen);
data/openmsx-16.0/Contrib/dmk/der2dmk.cc:57:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	void read(void* data, int size)
data/openmsx-16.0/Contrib/dmk/der2dmk.cc:109:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	derf.read(derHeader, 20);
data/openmsx-16.0/Contrib/dmk/der2dmk.cc:115:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	derf.read(derBuf.data(), derSize);
data/openmsx-16.0/Contrib/dmk/der2dmk.cc:187:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				inf.read(dp, sectorSize);
data/openmsx-16.0/Contrib/dmk/dsk2dmk.cc:57:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	void read(void* data, int size)
data/openmsx-16.0/Contrib/dmk/dsk2dmk.cc:174:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				inf.read(dp, sectorSize);
data/openmsx-16.0/Contrib/dmk/svi2dmk.cc:48:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	void read(void* data, int size)
data/openmsx-16.0/Contrib/dmk/svi2dmk.cc:121:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		inf.read(tp, sectorSize);
data/openmsx-16.0/Contrib/dmk/svicpm2dmk.cc:56:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	void read(void* data, int size)
data/openmsx-16.0/Contrib/dmk/svicpm2dmk.cc:187:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				inf.read(dp, sectorSize);
data/openmsx-16.0/Contrib/openmsx-control-socket.cc:341:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ssize_t size = read(sd, buf, 4096);
data/openmsx-16.0/Contrib/openmsx-control-socket.cc:350:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ssize_t size = read(STDIN_FILENO, buf, 4096);
data/openmsx-16.0/Contrib/openmsx-control-stdio.cc:398:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ssize_t size = read(pipe_from_child[0], buf, 4096);
data/openmsx-16.0/Contrib/openmsx-control-stdio.cc:407:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ssize_t size = read(STDIN_FILENO, buf, 4096);
data/openmsx-16.0/src/FirmwareSwitch.cc:24:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file.read(&bytebuf, 1);
data/openmsx-16.0/src/I8255.cc:42:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte I8255::read(byte port, EmuTime::param time)
data/openmsx-16.0/src/IPSPatch.cc:27:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ipsFile.read(buf, 5);
data/openmsx-16.0/src/IPSPatch.cc:31:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ipsFile.read(buf, 3);
data/openmsx-16.0/src/IPSPatch.cc:34:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ipsFile.read(buf, 2);
data/openmsx-16.0/src/IPSPatch.cc:39:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ipsFile.read(buf, 3);
data/openmsx-16.0/src/IPSPatch.cc:45:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ipsFile.read(&v.front(), length);
data/openmsx-16.0/src/IPSPatch.cc:74:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ipsFile.read(buf, 3);
data/openmsx-16.0/src/MSXMotherBoard.cc:162:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	byte read(unsigned address, EmuTime::param time) override;
data/openmsx-16.0/src/MSXMotherBoard.cc:1017:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte JoyPortDebuggable::read(unsigned address, EmuTime::param time)
data/openmsx-16.0/src/MSXMotherBoard.cc:1019:51:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return getMotherBoard().getJoystickPort(address).read(time);
data/openmsx-16.0/src/MSXPPI.cc:51:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return i8255.read(port & 0x03, time);
data/openmsx-16.0/src/MSXPrinterPort.cc:99:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte MSXPrinterPort::Debuggable::read(unsigned address)
data/openmsx-16.0/src/MSXS1990.cc:101:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte MSXS1990::Debuggable::read(unsigned address)
data/openmsx-16.0/src/SVIPPI.cc:103:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return i8255.read(port & 0x03, time);
data/openmsx-16.0/src/SVIPPI.cc:121:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	byte triggers = ((ports[0]->read(time) & 0x10) ? 0x10 : 0) |
data/openmsx-16.0/src/SVIPPI.cc:122:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	                ((ports[1]->read(time) & 0x10) ? 0x20 : 0);
data/openmsx-16.0/src/config/XMLLoader.cc:41:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file.read(buf.data(), size);
data/openmsx-16.0/src/cpu/MSXCPU.cc:446:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte MSXCPU::Debuggable::read(unsigned address)
data/openmsx-16.0/src/cpu/MSXCPUInterface.cc:1057:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte MSXCPUInterface::MemoryDebug::read(unsigned address, EmuTime::param time)
data/openmsx-16.0/src/cpu/MSXCPUInterface.cc:1080:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte MSXCPUInterface::SlottedMemoryDebug::read(unsigned address, EmuTime::param time)
data/openmsx-16.0/src/cpu/MSXCPUInterface.cc:1200:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte MSXCPUInterface::IODebug::read(unsigned address, EmuTime::param time)
data/openmsx-16.0/src/debugger/Debugger.cc:229:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		"read",              [&]{ read(tokens, result); },
data/openmsx-16.0/src/debugger/Debugger.cc:272:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void Debugger::Cmd::read(span<const TclObject> tokens, TclObject& result)
data/openmsx-16.0/src/debugger/Debugger.cc:280:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	result = device.read(addr);
data/openmsx-16.0/src/debugger/Debugger.cc:300:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		buf[i] = device.read(addr + i);
data/openmsx-16.0/src/debugger/SimpleDebuggable.cc:34:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte SimpleDebuggable::read(unsigned address)
data/openmsx-16.0/src/debugger/SimpleDebuggable.cc:36:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return read(address, motherBoard.getCurrentTime());
data/openmsx-16.0/src/debugger/SimpleDebuggable.cc:39:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte SimpleDebuggable::read(unsigned /*address*/, EmuTime::param /*time*/)
data/openmsx-16.0/src/events/CliConnection.cc:184:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int n = read(STDIN_FILENO, buf, sizeof(buf));
data/openmsx-16.0/src/events/CliServer.cc:160:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(addr.sun_path, socketName.c_str(), sizeof(addr.sun_path) - 1);
data/openmsx-16.0/src/fdc/DMKDiskImage.cc:48:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file->read(&header, sizeof(header));
data/openmsx-16.0/src/fdc/DMKDiskImage.cc:83:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file->read(idamBuf, sizeof(idamBuf));
data/openmsx-16.0/src/fdc/DMKDiskImage.cc:86:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file->read(output.getRawBuffer(), dmkTrackLen);
data/openmsx-16.0/src/fdc/DSKDiskImage.cc:25:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file->read(&buf, sizeof(buf));
data/openmsx-16.0/src/fdc/DirAsDSK.cc:581:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				file.read(buf, sz);
data/openmsx-16.0/src/fdc/MSXtar.cc:507:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			file.read(&buf, chunkSize);
data/openmsx-16.0/src/fdc/NowindHost.cc:57:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte NowindHost::read()
data/openmsx-16.0/src/fdc/NowindHost.cc:720:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		devices[dev].fs->read(&buf[len], 1);
data/openmsx-16.0/src/fdc/NowindInterface.cc:81:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return host.read();
data/openmsx-16.0/src/fdc/NowindInterface.cc:84:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return flash.read(bank * 0x4000 + (address & 0x3FFF));
data/openmsx-16.0/src/fdc/RawTrack.cc:54:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(idx) != 0xFE) return false; // 'sector'-data not filled in
data/openmsx-16.0/src/fdc/RawTrack.cc:61:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	sector.track    = read(idx++);
data/openmsx-16.0/src/fdc/RawTrack.cc:62:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	sector.head     = read(idx++);
data/openmsx-16.0/src/fdc/RawTrack.cc:63:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	sector.sector   = read(idx++);
data/openmsx-16.0/src/fdc/RawTrack.cc:64:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	sector.sizeCode = read(idx++);
data/openmsx-16.0/src/fdc/RawTrack.cc:65:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	byte addrCrc1 = read(idx++);
data/openmsx-16.0/src/fdc/RawTrack.cc:66:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	byte addrCrc2 = read(idx++);
data/openmsx-16.0/src/fdc/RawTrack.cc:80:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if (read(idx2 + j) != 0xA1) break;
data/openmsx-16.0/src/fdc/RawTrack.cc:84:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			byte type = read(idx2 + 3);
data/openmsx-16.0/src/fdc/RawTrack.cc:95:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			byte dataCrc1 = read(dataIdx + sectorSize + 0);
data/openmsx-16.0/src/fdc/RawTrack.cc:96:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			byte dataCrc2 = read(dataIdx + sectorSize + 1);
data/openmsx-16.0/src/fdc/RawTrack.cc:159:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		destination[i] = read(idx + i);
data/openmsx-16.0/src/fdc/RawTrack.cc:243:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ((read(i - 3) != 0xA1) ||
data/openmsx-16.0/src/fdc/RawTrack.cc:244:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    (read(i - 2) != 0xA1) ||
data/openmsx-16.0/src/fdc/RawTrack.cc:245:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    (read(i - 1) != 0xA1) ||
data/openmsx-16.0/src/fdc/RawTrack.cc:246:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    (read(i - 0) != 0xFE)) continue;
data/openmsx-16.0/src/fdc/RawTrack.cc:253:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if ((read(d - 4) != 0xA1) ||
data/openmsx-16.0/src/fdc/RawTrack.cc:254:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			    (read(d - 3) != 0xA1) ||
data/openmsx-16.0/src/fdc/RawTrack.cc:255:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			    (read(d - 2) != 0xA1)) continue;
data/openmsx-16.0/src/fdc/RealDrive.cc:385:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return trackValid ? track.read(idx) : 0;
data/openmsx-16.0/src/file/CompressedFileAdapter.cc:55:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void CompressedFileAdapter::read(void* buffer, size_t num)
data/openmsx-16.0/src/file/File.cc:24:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file->read(buf, 4);
data/openmsx-16.0/src/file/File.cc:83:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void File::read(void* buffer, size_t num)
data/openmsx-16.0/src/file/File.cc:85:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file->read(buffer, num);
data/openmsx-16.0/src/file/FileBase.cc:18:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		read(tmpBuf.data(), size);
data/openmsx-16.0/src/file/FileOperations.cc:805:17:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	auto oldMask = umask(S_IRWXO | S_IRWXG);
data/openmsx-16.0/src/file/FileOperations.cc:807:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(oldMask);
data/openmsx-16.0/src/file/FilePool.cc:184:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file.read(fileMem.data(), size);
data/openmsx-16.0/src/file/LocalFile.cc:107:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void LocalFile::read(void* buffer, size_t num)
data/openmsx-16.0/src/file/PreCacheFile.cc:47:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if (read != BLOCK_SIZE) {
data/openmsx-16.0/src/ide/BeerIDE.cc:48:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return i8255.read(port & 0x03, time);
data/openmsx-16.0/src/ide/HD.cc:104:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file.read(&buf, sizeof(buf));
data/openmsx-16.0/src/ide/HD.cc:275:24:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		if (ar.isLoader() && mismatch) {
data/openmsx-16.0/src/ide/IDECDROM.cc:116:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file.read(buf, count);
data/openmsx-16.0/src/ide/SCSILS120.cc:390:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file.read(buffer, SECTOR_SIZE * numSectors);
data/openmsx-16.0/src/ide/SCSILS120.cc:719:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file.read(&buf, sizeof(buf));
data/openmsx-16.0/src/ide/SunriseIDE.cc:242:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte SunriseIDE::Blocks::read(unsigned address)
data/openmsx-16.0/src/input/ArkanoidPad.cc:100:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte ArkanoidPad::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/input/ColecoJoystickIO.cc:40:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	const byte joyStatus = ports[joyPort]->read(time);
data/openmsx-16.0/src/input/DummyJoystick.cc:5:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte DummyJoystick::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/input/JoyMega.cc:147:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte JoyMega::read(EmuTime::param time)
data/openmsx-16.0/src/input/JoyTap.cc:52:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte JoyTap::read(EmuTime::param time)
data/openmsx-16.0/src/input/JoyTap.cc:56:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		value &= s->read(time);
data/openmsx-16.0/src/input/Joystick.cc:221:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte Joystick::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/input/JoystickPort.cc:42:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte JoystickPort::read(EmuTime::param time)
data/openmsx-16.0/src/input/JoystickPort.cc:44:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return getPluggedJoyDev().read(time);
data/openmsx-16.0/src/input/JoystickPort.cc:73:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte DummyJoystickPort::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/input/KeyJoystick.cc:98:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte KeyJoystick::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/input/Keyboard.cc:1296:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte Keyboard::KeybDebuggable::read(unsigned address)
data/openmsx-16.0/src/input/MagicKey.cc:29:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte MagicKey::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/input/Mouse.cc:116:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte Mouse::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/input/NinjaTap.cc:27:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte NinjaTap::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/input/NinjaTap.cc:43:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				byte t = slaves[i]->read(time);
data/openmsx-16.0/src/input/Paddle.cc:75:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte Paddle::read(EmuTime::param time)
data/openmsx-16.0/src/input/SETetrisDongle.cc:36:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte SETetrisDongle::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/input/Touchpad.cc:149:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte Touchpad::read(EmuTime::param time)
data/openmsx-16.0/src/input/Trackball.cc:104:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte Trackball::read(EmuTime::param time)
data/openmsx-16.0/src/input/UnicodeKeymap.cc:135:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			token.remove_prefix(strlen("DEADKEY"));
data/openmsx-16.0/src/laserdisc/OggReader.cc:440:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				 strlen("location="))) {
data/openmsx-16.0/src/laserdisc/OggReader.cc:441:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			metadata = tc.user_comments[i] + strlen("location=");
data/openmsx-16.0/src/laserdisc/OggReader.cc:789:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file.read(buffer, chunk);
data/openmsx-16.0/src/memory/AmdFlash.cc:253:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte AmdFlash::read(unsigned address)
data/openmsx-16.0/src/memory/Carnivore2.cc:195:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return flash.read(getDirectFlashAddr());
data/openmsx-16.0/src/memory/Carnivore2.cc:311:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return flash.read(addr);
data/openmsx-16.0/src/memory/Carnivore2.cc:404:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			return flash.read(addr);
data/openmsx-16.0/src/memory/Carnivore2.cc:595:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				return flash.read(addr);
data/openmsx-16.0/src/memory/CheckedRam.cc:36:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte CheckedRam::read(unsigned addr)
data/openmsx-16.0/src/memory/ColecoSuperGameModule.cc:115:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return ramAtBiosEnabled ? sgmRam.read(address) : biosRom[address];
data/openmsx-16.0/src/memory/ColecoSuperGameModule.cc:118:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			return sgmRam.read(address);
data/openmsx-16.0/src/memory/ColecoSuperGameModule.cc:120:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			return mainRam.read(translateMainRamAddress(address));
data/openmsx-16.0/src/memory/EEPROM_93C46.cc:26:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
uint8_t EEPROM_93C46::read(unsigned addr)
data/openmsx-16.0/src/memory/EEPROM_93C46.cc:132:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			uint8_t value = read(address);
data/openmsx-16.0/src/memory/KonamiUltimateCollection.cc:115:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		? flash.read(flashAddr)
data/openmsx-16.0/src/memory/MSXHBI55.cc:61:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return i8255.read(port & 0x03, time);
data/openmsx-16.0/src/memory/MSXMapperIO.cc:88:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte MSXMapperIO::Debuggable::read(unsigned address)
data/openmsx-16.0/src/memory/MSXMemoryMapperBase.cc:86:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return checkedRam.read(calcAddress(address));
data/openmsx-16.0/src/memory/MSXMemoryMapperBase.cc:114:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte MSXMemoryMapperBase::Debuggable::read(unsigned address)
data/openmsx-16.0/src/memory/MSXRam.cc:54:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return checkedRam->read(translate(address));
data/openmsx-16.0/src/memory/MegaFlashRomSCCPlus.cc:316:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return flash.read(flashAddr);
data/openmsx-16.0/src/memory/MegaFlashRomSCCPlusSD.cc:459:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return flash.read(addr & 0x3FFF);
data/openmsx-16.0/src/memory/MegaFlashRomSCCPlusSD.cc:547:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		? flash.read(flashAddr)
data/openmsx-16.0/src/memory/MegaFlashRomSCCPlusSD.cc:735:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return checkedRam->read(calcMemMapperAddress(addr));
data/openmsx-16.0/src/memory/MegaFlashRomSCCPlusSD.cc:798:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return flash.read(flashAddr);
data/openmsx-16.0/src/memory/Ram.cc:24:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	byte read(unsigned address) override;
data/openmsx-16.0/src/memory/Ram.cc:109:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte RamDebuggable::read(unsigned address)
data/openmsx-16.0/src/memory/ReproCartridgeV1.cc:125:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		? flash.read(flashAddr)
data/openmsx-16.0/src/memory/ReproCartridgeV2.cc:160:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		? flash.read(flashAddr)
data/openmsx-16.0/src/memory/Rom.cc:38:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	byte read(unsigned address) override;
data/openmsx-16.0/src/memory/Rom.cc:407:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte RomDebuggable::read(unsigned address)
data/openmsx-16.0/src/memory/RomDatabase.cc:589:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			file.read(buf, size);
data/openmsx-16.0/src/memory/RomHolyQuran2.cc:129:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte RomHolyQuran2::Blocks::read(unsigned address)
data/openmsx-16.0/src/memory/RomManbow2.cc:129:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		return flash.read(addr);
data/openmsx-16.0/src/memory/RomMatraInk.cc:26:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return flash.read(address);
data/openmsx-16.0/src/memory/SRAM.cc:95:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			size_t length = strlen(header);
data/openmsx-16.0/src/memory/SRAM.cc:97:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			file.read(temp, length);
data/openmsx-16.0/src/memory/SRAM.cc:103:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			file.read(ram.getWriteBackdoor(), getSize());
data/openmsx-16.0/src/memory/SRAM.cc:129:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			int length = int(strlen(header));
data/openmsx-16.0/src/serial/Midi_w32.cc:79:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(src);
data/openmsx-16.0/src/serial/Midi_w32.cc:130:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	strncpy(vfnt_midiout[0].vfname, "midi-out", MAXPATHLEN + 1);
data/openmsx-16.0/src/serialize.cc:292:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((gzwrite(file, const_cast<char*>(header), unsigned(strlen(header))) == 0) ||
data/openmsx-16.0/src/sound/AY8910.cc:997:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte AY8910::Debuggable::read(unsigned address, EmuTime::param time)
data/openmsx-16.0/src/sound/DummyY8950KeyboardDevice.cc:10:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte DummyY8950KeyboardDevice::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/sound/MSXPSG.cc:73:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	byte joystick = ports[selectedPort]->read(time) |
data/openmsx-16.0/src/sound/MSXSCCPlusCart.cc:27:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			file.read(&ram[0], size);
data/openmsx-16.0/src/sound/ResampleHQ.cc:310:14:  [1] (buffer) is_permutation:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	assert(std::is_permutation(permute, permute + N2, testPerm));
data/openmsx-16.0/src/sound/SCC.cc:511:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte SCC::Debuggable::read(unsigned address, EmuTime::param time)
data/openmsx-16.0/src/sound/SN76489.cc:343:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte SN76489::Debuggable::read(unsigned address, EmuTime::param time)
data/openmsx-16.0/src/sound/SVIPSG.cc:105:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return ((ports[1]->read(time) & 0x0F) << 4) |
data/openmsx-16.0/src/sound/SVIPSG.cc:106:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	       ((ports[0]->read(time) & 0x0F) << 0);
data/openmsx-16.0/src/sound/Y8950.cc:1206:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			byte input = periphery.read(time);
data/openmsx-16.0/src/sound/Y8950.cc:1390:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte Y8950::Debuggable::read(unsigned address, EmuTime::param time)
data/openmsx-16.0/src/sound/Y8950KeyboardConnector.cc:26:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte Y8950KeyboardConnector::read(EmuTime::param time)
data/openmsx-16.0/src/sound/Y8950KeyboardConnector.cc:28:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return getPluggedKeyb().read(time);
data/openmsx-16.0/src/sound/Y8950KeyboardConnector.cc:34:52:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return const_cast<Y8950KeyboardConnector*>(this)->read(time);
data/openmsx-16.0/src/sound/Y8950Periphery.cc:29:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	nibble read(EmuTime::param time) override;
data/openmsx-16.0/src/sound/Y8950Periphery.cc:52:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	nibble read(EmuTime::param time) override;
data/openmsx-16.0/src/sound/Y8950Periphery.cc:81:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	nibble read(EmuTime::param time) override;
data/openmsx-16.0/src/sound/Y8950Periphery.cc:140:51:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	nibble actual = (outputs & values) | (~outputs & read(time));
data/openmsx-16.0/src/sound/Y8950Periphery.cc:145:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
nibble MusicModulePeriphery::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/sound/Y8950Periphery.cc:190:51:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	nibble actual = (outputs & values) | (~outputs & read(time));
data/openmsx-16.0/src/sound/Y8950Periphery.cc:194:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
nibble PanasonicAudioPeriphery::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/sound/Y8950Periphery.cc:307:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
nibble ToshibaAudioPeriphery::read(EmuTime::param /*time*/)
data/openmsx-16.0/src/sound/YM2413.cc:24:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte YM2413::Debuggable::read(unsigned address)
data/openmsx-16.0/src/sound/YMF262.cc:1738:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte YMF262::Debuggable::read(unsigned address)
data/openmsx-16.0/src/sound/YMF278.cc:1126:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte YMF278::DebugRegisters::read(unsigned address)
data/openmsx-16.0/src/sound/YMF278.cc:1148:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte YMF278::DebugMemory::read(unsigned address)
data/openmsx-16.0/src/unittest/Date_test.cc:9:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	REQUIRE(strlen(s) >= 24); // precondition
data/openmsx-16.0/src/unittest/MemoryBufferFile.cc:9:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void MemoryBufferFile::read(void* dst, size_t num)
data/openmsx-16.0/src/unittest/MemoryBufferFile_test.cc:23:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file.read(tmp, 3);
data/openmsx-16.0/src/unittest/MemoryBufferFile_test.cc:32:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	CHECK_THROWS(file.read(tmp, 2));
data/openmsx-16.0/src/unittest/MemoryBufferFile_test.cc:37:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	CHECK_THROWS(file.read(tmp, 100));
data/openmsx-16.0/src/unittest/MemoryBufferFile_test.cc:42:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file.read(tmp, file.getSize());
data/openmsx-16.0/src/unittest/eeprom.cc:111:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
static uint8_t read(EEPROM_93C46& eeprom, EmuTime& time, unsigned addr)
data/openmsx-16.0/src/unittest/eeprom.cc:240:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	CHECK(int(read(eeprom, time, 45)) == 123); // contains 123
data/openmsx-16.0/src/unittest/eeprom.cc:242:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	CHECK(int(read(eeprom, time, 46)) == 255); // other addr still contains 255
data/openmsx-16.0/src/unittest/sha1.cc:109:68:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	Sha1Sum output = SHA1::calc(reinterpret_cast<const uint8_t*>(in), strlen(in));
data/openmsx-16.0/src/unittest/sha1.cc:118:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		sha1.update(reinterpret_cast<const uint8_t*>(in), strlen(in));
data/openmsx-16.0/src/unittest/sha1.cc:126:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		REQUIRE(strlen(in) == 25);
data/openmsx-16.0/src/unittest/sha1.cc:128:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			sha1.update(reinterpret_cast<const uint8_t*>(in), strlen(in));
data/openmsx-16.0/src/utils/DeltaBlock.cc:139:18:  [1] (buffer) mismatch:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
end:	return std::mismatch(p, p_end, q);
data/openmsx-16.0/src/utils/win32-dirent.cc:77:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(entry.d_name, d_name.c_str(), std::size(entry.d_name));
data/openmsx-16.0/src/utils/win32-dirent.cc:80:47:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	entry.d_reclen = static_cast<unsigned short>(strlen(entry.d_name));
data/openmsx-16.0/src/video/AviWriter.cc:68:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		auto len1 = strlen(s) + 1; // +1 for zero-terminator
data/openmsx-16.0/src/video/AviWriter.cc:200:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		+ (4 + 4 + ((strlen(dateStr  ) + 1 + 1) & ~1)) // 2nd chunk
data/openmsx-16.0/src/video/AviWriter.cc:207:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	AVIOUTd(unsigned(strlen(dateStr)) + 1); // # of bytes to follow
data/openmsx-16.0/src/video/PNG.cc:88:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file->read(area, size);
data/openmsx-16.0/src/video/VDP.cc:1569:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte VDP::RegDebug::read(unsigned address)
data/openmsx-16.0/src/video/VDP.cc:1601:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte VDP::StatusRegDebug::read(unsigned address, EmuTime::param time)
data/openmsx-16.0/src/video/VDP.cc:1616:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte VDP::PaletteDebug::read(unsigned address)
data/openmsx-16.0/src/video/VDP.cc:1649:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte VDP::VRAMPointerDebug::read(unsigned address)
data/openmsx-16.0/src/video/VDPVRAM.cc:57:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte VDPVRAM::LogicalVRAMDebuggable::read(unsigned address, EmuTime::param time)
data/openmsx-16.0/src/video/VDPVRAM.cc:82:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte VDPVRAM::PhysicalVRAMDebuggable::read(unsigned address, EmuTime::param time)
data/openmsx-16.0/src/video/v9990/V9990.cc:498:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte V9990::RegDebug::read(unsigned address)
data/openmsx-16.0/src/video/v9990/V9990.cc:521:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
byte V9990::PalDebug::read(unsigned address)

ANALYSIS SUMMARY:

Hits = 472
Lines analyzed = 157880 in approximately 3.86 seconds (40922 lines/second)
Physical Source Lines of Code (SLOC) = 124507
Hits@level = [0]  65 [1] 218 [2] 203 [3]  45 [4]   5 [5]   1
Hits@level+ = [0+] 537 [1+] 472 [2+] 254 [3+]  51 [4+]   6 [5+]   1
Hits/KSLOC@level+ = [0+] 4.31301 [1+] 3.79095 [2+] 2.04005 [3+] 0.409616 [4+] 0.0481901 [5+] 0.00803168
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.