[Scummvm-git-logs] scummvm master -> 1ec0dfb5e113b986f002ab1efdbad938be1025fe
rvanlaar
noreply at scummvm.org
Tue Oct 18 07:35:38 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1ec0dfb5e1 DIRECTOR: Fix segfault when loading broken pic
Commit: 1ec0dfb5e113b986f002ab1efdbad938be1025fe
https://github.com/scummvm/scummvm/commit/1ec0dfb5e113b986f002ab1efdbad938be1025fe
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-10-18T09:34:37+02:00
Commit Message:
DIRECTOR: Fix segfault when loading broken pic
Handle loadStream returning false when the pic doesn't confirm.
In this case a 'DIB ' with a headersize not matching 40.
Observed happening in:
- Fujitsu fm TOWNS Super TECHNOLOGY DEMO
- KUZIRA.MMM from PINGU
Changed paths:
engines/director/cast.cpp
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index d2bd6cce9c8..02f92874db8 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -721,13 +721,13 @@ void Cast::loadBitmapData(int key, BitmapCastMember *bitmapCast) {
break;
}
- if (!img) {
+ if (!img || !img->loadStream(*pic)) {
+ warning("Cast::loadBitmapData():: Unable to load id: %d", imgId);
delete pic;
+ delete img;
return;
}
- img->loadStream(*pic);
-
bitmapCast->_img = img;
const Graphics::Surface *surf = img->getSurface();
bitmapCast->_size = surf->pitch * surf->h + img->getPaletteColorCount() * 3;
More information about the Scummvm-git-logs
mailing list