[Scummvm-git-logs] scummvm master -> 35c2f9ade51451de8dc88477500b82cfe69f2a5f

bluegr bluegr at gmail.com
Sun Jul 7 13:16:50 CEST 2019


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:
35c2f9ade5 BACKENDS: Fix crash when save file is owned by another user


Commit: 35c2f9ade51451de8dc88477500b82cfe69f2a5f
    https://github.com/scummvm/scummvm/commit/35c2f9ade51451de8dc88477500b82cfe69f2a5f
Author: Orgad Shaneh (orgad.shaneh at audiocodes.com)
Date: 2019-07-07T14:16:46+03:00

Commit Message:
BACKENDS: Fix crash when save file is owned by another user

fopen() fails, but the null handle was passed on to OutSaveFile.

Changed paths:
    backends/saves/default/default-saves.cpp


diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp
index 8973101..44fd48b 100644
--- a/backends/saves/default/default-saves.cpp
+++ b/backends/saves/default/default-saves.cpp
@@ -169,6 +169,8 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const Common::String
 
 	// Open the file for saving.
 	Common::WriteStream *const sf = fileNode.createWriteStream();
+	if (!sf)
+		return nullptr;
 	Common::OutSaveFile *const result = new Common::OutSaveFile(compress ? Common::wrapCompressedWriteStream(sf) : sf);
 
 	// Add file to cache now that it exists.





More information about the Scummvm-git-logs mailing list