AGI: Crash when saving fallback-matched game
|Reported by:||SF/rinco||Owned by:||lordhoto|
If you're running a AGI game that has used fallback matching (that is, during loading you get a message like "Your game version has been detected using fallback matching as a variant of agi-fanmade (Unknown v3 Game).") then attempting to save the game will crash scummvm.
This is due to the unchecked use of the return from getGameMD5() in AgiEngine::saveGame() (engines/agi/saveload.cpp:101 in the SVN version as I write this):
const char *tmp = getGameMD5(); for (i = 0; i < 32; i++) out->writeByte(tmp[i]);
For a fallback-matched game, the md5 field, and thus the return value of getGameMD5(), is null and so the above code causes a segfault. I'm not sure what the intended behaviour for this case is, but I can't imagine a segfault is it ;)
Ticket imported from: #2849084. Ticket imported from: bugs/4582.
Change History (10)
comment:6 by , 12 years ago
|Summary:||Crash when saving fallback-matched AGI game → AGI: Crash when saving fallback-matched game|