[Scummvm-git-logs] scummvm master -> b43bc49afb5da9b5d9c71651805df22b9b4328bf
mduggan
noreply at scummvm.org
Sat Jan 21 07:01:32 UTC 2023
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:
b43bc49afb ULTIMA: NUVIE: Fix potential use of uninitialized variable
Commit: b43bc49afb5da9b5d9c71651805df22b9b4328bf
https://github.com/scummvm/scummvm/commit/b43bc49afb5da9b5d9c71651805df22b9b4328bf
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-01-21T16:01:17+09:00
Commit Message:
ULTIMA: NUVIE: Fix potential use of uninitialized variable
Changed paths:
engines/ultima/nuvie/keybinding/keys.cpp
diff --git a/engines/ultima/nuvie/keybinding/keys.cpp b/engines/ultima/nuvie/keybinding/keys.cpp
index edc3b3d660f..120dc572ce7 100644
--- a/engines/ultima/nuvie/keybinding/keys.cpp
+++ b/engines/ultima/nuvie/keybinding/keys.cpp
@@ -596,9 +596,12 @@ void KeyBinder::ParseLine(char *line) {
}
void KeyBinder::LoadFromFileInternal(const char *filename) {
- Common::ReadStream *keyfile;
+ Common::ReadStream *keyfile = nullptr;
openFile(keyfile, filename);
+ if (!keyfile)
+ ::error("Keybinder: can't open file %s", filename);
+
char temp[1024]; // 1024 should be long enough
while (!keyfile->eos()) {
strgets(temp, 1024, keyfile);
More information about the Scummvm-git-logs
mailing list