Serialize: Don't read past a savestate title without a terminator

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-09-28 09:34:06 -06:00
1 parent 7ad9a64cf4
commit 11e30e9456
1 file changed
+2 -1
+2 -1
View File
@@ -363,7 +363,8 @@ CChunkFileReader::Error CChunkFileReader::LoadFileHeader(File::IOFile &pFile, SC
}
if (title) {
*title = titleFixed;
// Not necessarily terminated in the file.
*title = std::string(titleFixed, strnlen(titleFixed, sizeof(titleFixed)));
}
headerSize += 128;