[Scummvm-git-logs] scummvm master -> d36cd5b619821775447680e7201fb897785f6da3
aquadran
noreply at scummvm.org
Sun Oct 26 19:09:37 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:
d36cd5b619 GRIM: Fix use of unitialized BitmapData members
Commit: d36cd5b619821775447680e7201fb897785f6da3
https://github.com/scummvm/scummvm/commit/d36cd5b619821775447680e7201fb897785f6da3
Author: Ingo van Lil (inguin at gmx.de)
Date: 2025-10-26T20:09:34+01:00
Commit Message:
GRIM: Fix use of unitialized BitmapData members
The constructor to initialize a BitmapData from a surface (used for the
savegame screenshots in EMI) leaves a few members uninitialized.
The shader-based renderer uses _numCoords to calculate the size of a
buffer to allocate, resulting in undefined behavior and sporadic
out-of-memory warnings.
Changed paths:
engines/grim/bitmap.cpp
diff --git a/engines/grim/bitmap.cpp b/engines/grim/bitmap.cpp
index 6b19e69a90e..e77b97ce380 100644
--- a/engines/grim/bitmap.cpp
+++ b/engines/grim/bitmap.cpp
@@ -194,6 +194,10 @@ BitmapData::BitmapData(const Graphics::Surface &buf, int w, int h, const char *f
_verts = nullptr;
_layers = nullptr;
+ _numCoords = 0;
+ _numVerts = 0;
+ _numLayers = 0;
+
g_driver->createBitmap(this);
}
More information about the Scummvm-git-logs
mailing list