[Scummvm-git-logs] scummvm master -> 1d8af3ea43abb11de89266038c3c2512d07a13f3
Strangerke
noreply at scummvm.org
Sun Jun 8 23:01:14 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
1d8af3ea43 M4: Add safeguards to fix coverity issues 1532905 and 1532953
Commit: 1d8af3ea43abb11de89266038c3c2512d07a13f3
https://github.com/scummvm/scummvm/commit/1d8af3ea43abb11de89266038c3c2512d07a13f3
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-06-09T00:00:47+01:00
Commit Message:
M4: Add safeguards to fix coverity issues 1532905 and 1532953
Changed paths:
engines/m4/wscript/ws_machine.cpp
diff --git a/engines/m4/wscript/ws_machine.cpp b/engines/m4/wscript/ws_machine.cpp
index 8713e53b736..799647e2220 100644
--- a/engines/m4/wscript/ws_machine.cpp
+++ b/engines/m4/wscript/ws_machine.cpp
@@ -875,8 +875,13 @@ static int32 StepAt(int32 *pcOffset, machine *m) {
*pcOffset += (byte *)myPC - (byte *)oldPC;
if (myInstruction >= 64) {
+ if (myInstruction > 74)
+ error("Unexpected instruction %d", myInstruction);
condOpTable[myInstruction - 64](m, pcOffset);
} else if (myInstruction > 0) {
+ if (myInstruction > 15)
+ error("Unexpected instruction %d", myInstruction);
+
bool keepProcessing = immOpTable[myInstruction](m, pcOffset);
if (!keepProcessing) {
More information about the Scummvm-git-logs
mailing list