[ scummvm-Bugs-2849495 ] Crash when saving fallback-matched AGI game

SourceForge.net noreply at sourceforge.net
Thu Sep 3 00:13:28 CEST 2009


Bugs item #2849495, was opened at 2009-09-02 22:13
Message generated for change (Tracker Item Submitted) made by rinco
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=2849495&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Unknown Crash/Other
Group: AGI Fanmade
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Bernard Duggan (rinco)
Assigned to: Nobody/Anonymous (nobody)
Summary: Crash when saving fallback-matched AGI game

Initial Comment:
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 ;)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=2849495&group_id=37116




More information about the Scummvm-tracker mailing list