[Scummvm-git-logs] scummvm branch-2-6 -> 9fcd8e40814ec2ded514c98d182b5e44f75462a2
criezy
noreply at scummvm.org
Mon Oct 3 17:49:17 UTC 2022
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:
3691fdd57d AGS: Fix ReadEncInt32() on big-endian systems
9fcd8e4081 AGS: Fix access to uninitialized memory in base SpriteFont plugin
Commit: 3691fdd57d0d766818a23e6f7434a081e73ca0ab
https://github.com/scummvm/scummvm/commit/3691fdd57d0d766818a23e6f7434a081e73ca0ab
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-10-03T18:45:09+01:00
Commit Message:
AGS: Fix ReadEncInt32() on big-endian systems
Fixes kq1agdi crashing on big-endian systems, since it tried to allocate
a gigantic amount of memory from MFLUtil::ReadV21() because of the
misread values.
>From upstream 5e29a339fc83bf5c06a3a9a3b1c65a2fc4b4e72c
Also includes upstream 427752da015fd93549deef1a31d5e533e5c9319e
Changed paths:
engines/ags/shared/util/multi_file_lib.cpp
diff --git a/engines/ags/shared/util/multi_file_lib.cpp b/engines/ags/shared/util/multi_file_lib.cpp
index b4bc0f977f4..b4c0364ea95 100644
--- a/engines/ags/shared/util/multi_file_lib.cpp
+++ b/engines/ags/shared/util/multi_file_lib.cpp
@@ -402,9 +402,10 @@ int32_t MFLUtil::ReadEncInt32(Stream *in, int &rand_val) {
int val;
ReadEncArray(&val, sizeof(int32_t), 1, in, rand_val);
#if AGS_PLATFORM_ENDIAN_BIG
- AGS::Shared::BitByteOperations::SwapBytesInt32(val);
-#endif
+ return AGS::Shared::BitByteOperations::SwapBytesInt32(val);
+#else
return val;
+#endif
}
void MFLUtil::ReadEncString(char *buffer, size_t max_len, Stream *in, int &rand_val) {
Commit: 9fcd8e40814ec2ded514c98d182b5e44f75462a2
https://github.com/scummvm/scummvm/commit/9fcd8e40814ec2ded514c98d182b5e44f75462a2
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2022-10-03T18:45:26+01:00
Commit Message:
AGS: Fix access to uninitialized memory in base SpriteFont plugin
When using the base SpriteFont plugin and not the ClifftopGames variant,
the renderers pointer were not initialized in the constructor, which
could lead to them not being instantiated, and then causing a crash.
Changed paths:
engines/ags/plugins/ags_sprite_font/ags_sprite_font.h
diff --git a/engines/ags/plugins/ags_sprite_font/ags_sprite_font.h b/engines/ags/plugins/ags_sprite_font/ags_sprite_font.h
index 2c03a9f482b..40a1dcd60ba 100644
--- a/engines/ags/plugins/ags_sprite_font/ags_sprite_font.h
+++ b/engines/ags/plugins/ags_sprite_font/ags_sprite_font.h
@@ -48,7 +48,7 @@ private:
void SetLineHeightAdjust(ScriptMethodParams ¶ms);
public:
- AGSSpriteFont() : PluginBase() {}
+ AGSSpriteFont() : PluginBase(), _fontRenderer(nullptr), _vWidthRenderer(nullptr) {}
virtual ~AGSSpriteFont() {}
const char *AGS_GetPluginName() override;
More information about the Scummvm-git-logs
mailing list