(svn r15626) -Fix [FS#2698]: UTF8 string handling could cause buffer overruns.

This commit is contained in:
rubidium
2009-03-06 01:23:25 +00:00
parent 9c6d6c0d0e
commit 34bd9ee636
8 changed files with 38 additions and 13 deletions

View File

@@ -232,6 +232,7 @@ static inline bool CheckOldSavegameType(FILE *f, char *temp, const char *last, u
bool ret = VerifyOldNameChecksum(temp, len);
temp[len - 2] = '\0'; // name is nul-terminated in savegame, but it's better to be sure
str_validate(temp, last);
return ret;
}