Fix 1 byte buffer over-read in old gamelog loader

This commit is contained in:
Jonathan G Rennison 2019-02-16 19:53:06 +00:00
parent d90e7d2996
commit e6b788591d

View File

@ -136,7 +136,7 @@ static void Load_GLOG_common(LoggedAction *&gamelog_action, uint &gamelog_action
SlObject(lc, _glog_desc[ct]); SlObject(lc, _glog_desc[ct]);
if (ct == GLCT_REVISION && SlXvIsFeatureMissing(XSLFI_EXTENDED_GAMELOG)) { if (ct == GLCT_REVISION && SlXvIsFeatureMissing(XSLFI_EXTENDED_GAMELOG)) {
lc->revision.text = stredup(old_revision_text); lc->revision.text = stredup(old_revision_text, lastof(old_revision_text));
} }
} }
} }