Core: Fix stack bound error

This commit is contained in:
Vicki Pfau 2018-09-03 11:22:20 -07:00
parent 7020e45841
commit 880a86df30
1 changed files with 3 additions and 2 deletions

View File

@ -327,9 +327,10 @@ bool mCoreSaveStateNamed(struct mCore* core, struct VFile* vf, int flags) {
struct mStateExtdataItem item = {
.size = sizeof(creationUsec),
.data = &creationUsec,
.clean = NULL
.data = malloc(sizeof(creationUsec)),
.clean = free
};
*(uint64_t*) item.data = creationUsec;
mStateExtdataPut(&extdata, EXTDATA_META_TIME, &item);
}