[Scummvm-git-logs] scummvm master -> 01ab50eae6c9e4cbe579e9a36eced02fcfba5eab
sluicebox
noreply at scummvm.org
Mon Nov 20 04:29:59 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
4693cdff28 SAGA: Fix buffer overflow. PVS-Studio V512
01ab50eae6 AUDIO: FM-TOWNS/PC-98: Fix array init. PVS-Studio V512
Commit: 4693cdff289955cc01aa2f224c415962f95d9e33
https://github.com/scummvm/scummvm/commit/4693cdff289955cc01aa2f224c415962f95d9e33
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-11-19T20:29:44-08:00
Commit Message:
SAGA: Fix buffer overflow. PVS-Studio V512
Changed paths:
engines/saga/script.h
diff --git a/engines/saga/script.h b/engines/saga/script.h
index 5f1982f4db9..af2574a6027 100644
--- a/engines/saga/script.h
+++ b/engines/saga/script.h
@@ -256,7 +256,7 @@ public:
memset(&_waitType, 0xFE, sizeof(_waitType));
memset(&_sleepTime, 0xFE, sizeof(_sleepTime));
memset(&_threadObj, 0xFE, sizeof(_threadObj));
- memset(&_returnValue, 0xFE, sizeof(_threadObj));
+ memset(&_returnValue, 0xFE, sizeof(_returnValue));
memset(&_frameWait, 0xFE, sizeof(_frameWait));
_flags = kTFlagNone;
Commit: 01ab50eae6c9e4cbe579e9a36eced02fcfba5eab
https://github.com/scummvm/scummvm/commit/01ab50eae6c9e4cbe579e9a36eced02fcfba5eab
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-11-19T20:29:44-08:00
Commit Message:
AUDIO: FM-TOWNS/PC-98: Fix array init. PVS-Studio V512
The intent was to initialize a two dimensional array but instead only
the first 257 of 510 bytes were initialized.
Changed paths:
audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
diff --git a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
index 8164a78125e..14f7287ddc6 100644
--- a/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_pc98_fmsynth.cpp
@@ -967,8 +967,7 @@ TownsPC98_FmSynth::TownsPC98_FmSynth(Audio::Mixer *mixer, EmuType type) :
memset(&_timers[0], 0, sizeof(ChipTimer));
memset(&_timers[1], 0, sizeof(ChipTimer));
- memset(_registers[0], 0, 255);
- memset(_registers[1], 0, 255);
+ memset(_registers, 0, sizeof(_registers));
_timerProcIdle = new ChipTimerProc(this, &TownsPC98_FmSynth::idleTimerCallback);
_timerProcA = new ChipTimerProc(this, &TownsPC98_FmSynth::timerCallbackA);
@@ -1056,8 +1055,7 @@ void TownsPC98_FmSynth::reset() {
_chanInternal[i].updateEnvelopeParameters = false;
}
- memset(_registers[0], 0, 255);
- memset(_registers[1], 0, 255);
+ memset(_registers, 0, sizeof(_registers));
#ifdef ENABLE_SNDTOWNS98_WAITCYCLES
_waitCycleElapsedWrites.clear();
More information about the Scummvm-git-logs
mailing list