[Scummvm-git-logs] scummvm master -> c1248bb9714ffec97a7885b84995758bc1db23f6
sluicebox
noreply at scummvm.org
Wed Mar 6 16:32:45 UTC 2024
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c255bd8bd4 FREESCAPE: Fix memory leak in unpacker
1f8c726ce2 MTROPOLIS: Fix memory leak on InstallShield error
7e382256ac AGI: Fix uninitialized WagProperty pointer
c1248bb971 AGI: Remove unused StringData
Commit: c255bd8bd4d6ac8ff948c9f212968ffa15c1a052
https://github.com/scummvm/scummvm/commit/c255bd8bd4d6ac8ff948c9f212968ffa15c1a052
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-03-06T09:29:08-07:00
Commit Message:
FREESCAPE: Fix memory leak in unpacker
Coverity CID 1534349
Changed paths:
engines/freescape/unpack.cpp
diff --git a/engines/freescape/unpack.cpp b/engines/freescape/unpack.cpp
index 515d1431124..82ba15c6b63 100644
--- a/engines/freescape/unpack.cpp
+++ b/engines/freescape/unpack.cpp
@@ -290,6 +290,7 @@ Common::MemoryReadStream *unpack(struct memstream *ms) {
reverse(unpacked_data, unpacked_data_size);
reloc = create_reloc_table(ms, &dh, &eh, &reloc_size);
Common::MemoryReadStream *ret = craftexec(&dh, &eh, unpacked_data, unpacked_data_size, reloc, reloc_size);
+ free(reloc);
free(unpacked_data);
return ret;
}
Commit: 1f8c726ce21520a6eb74b049e70522c9b88891c6
https://github.com/scummvm/scummvm/commit/1f8c726ce21520a6eb74b049e70522c9b88891c6
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-03-06T09:29:08-07:00
Commit Message:
MTROPOLIS: Fix memory leak on InstallShield error
Coverity CID 1531322
Changed paths:
engines/mtropolis/boot.cpp
diff --git a/engines/mtropolis/boot.cpp b/engines/mtropolis/boot.cpp
index 1e662b8fc6f..39fc3e19e32 100644
--- a/engines/mtropolis/boot.cpp
+++ b/engines/mtropolis/boot.cpp
@@ -1208,6 +1208,8 @@ void BootScriptContext::addArchive(ArchiveType archiveType, const Common::String
Common::InstallShieldV3 *isa = new Common::InstallShieldV3();
if (isa->open(stream))
archive = isa;
+ else
+ delete isa;
}
break;
case kArchiveTypeInstallShieldCab: {
Commit: 7e382256ac7602ad61b03c145acdd1445d6e8ba2
https://github.com/scummvm/scummvm/commit/7e382256ac7602ad61b03c145acdd1445d6e8ba2
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-03-06T09:29:08-07:00
Commit Message:
AGI: Fix uninitialized WagProperty pointer
Coverity CID 1435881
Changed paths:
engines/agi/wagparser.cpp
diff --git a/engines/agi/wagparser.cpp b/engines/agi/wagparser.cpp
index 54d5536fafe..0280973233b 100644
--- a/engines/agi/wagparser.cpp
+++ b/engines/agi/wagparser.cpp
@@ -57,6 +57,8 @@ void WagProperty::deepCopy(const WagProperty &other) {
if (other._propData != nullptr) {
_propData = (char *)calloc(other._propSize + 1UL, 1); // Allocate space for property's data plus trailing zero
memcpy(_propData, other._propData, other._propSize + 1UL); // Copy the whole thing
+ } else {
+ _propData = nullptr;
}
}
Commit: c1248bb9714ffec97a7885b84995758bc1db23f6
https://github.com/scummvm/scummvm/commit/c1248bb9714ffec97a7885b84995758bc1db23f6
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2024-03-06T09:30:57-07:00
Commit Message:
AGI: Remove unused StringData
Changed paths:
engines/agi/agi.cpp
engines/agi/agi.h
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index a62ae803f45..740b9c13080 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -351,8 +351,6 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
_intobj = nullptr;
- memset(&_stringdata, 0, sizeof(struct StringData));
-
_restartGame = false;
_firstSlot = 0;
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 1f3e0ae8db3..7f97fdf5197 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -675,13 +675,6 @@ struct ImageStackElement {
int16 parm7;
};
-struct StringData {
- int x;
- int y;
- int len;
- int str;
-};
-
#define TICK_SECONDS 20
#define KEY_QUEUE_SIZE 16
@@ -843,8 +836,6 @@ private:
public:
Common::Array<AgiObject> _objects; // objects in the game
- StringData _stringdata;
-
SavedGameSlotIdArray getSavegameSlotIds();
bool getSavegameInformation(int16 slotId, Common::String &saveDescription, uint32 &saveDate, uint32 &saveTime, bool &saveIsValid);
More information about the Scummvm-git-logs
mailing list