[Scummvm-git-logs] scummvm master -> f2aa112344ceb405a090ce96f0700abd8b3320c7
SupSuper
supsuper at gmail.com
Mon Nov 2 21:35:35 UTC 2020
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:
f2aa112344 STARK: Don't append \0 when reading null-terminated strings.
Commit: f2aa112344ceb405a090ce96f0700abd8b3320c7
https://github.com/scummvm/scummvm/commit/f2aa112344ceb405a090ce96f0700abd8b3320c7
Author: SupSuper (supsuper at gmail.com)
Date: 2020-11-02T21:35:17Z
Commit Message:
STARK: Don't append \0 when reading null-terminated strings.
This causes undefined behavior with the new BaseString refactor
Changed paths:
engines/stark/formats/xarc.cpp
diff --git a/engines/stark/formats/xarc.cpp b/engines/stark/formats/xarc.cpp
index 017d52421d..7695f15c5f 100644
--- a/engines/stark/formats/xarc.cpp
+++ b/engines/stark/formats/xarc.cpp
@@ -84,7 +84,8 @@ Common::String XARCMember::readString(Common::ReadStream &stream) {
c = stream.readByte();
if (stream.eos()) {
c = 0;
- } else {
+ }
+ if (c != 0) {
str += c;
}
}
More information about the Scummvm-git-logs
mailing list