all repos — mgba @ 880a86df301a93e60bf6e07eb08e5c418a71f09d

mGBA Game Boy Advance Emulator

Core: Fix stack bound error
Vicki Pfau vi@endrift.com
Mon, 03 Sep 2018 11:22:20 -0700
commit

880a86df301a93e60bf6e07eb08e5c418a71f09d

parent

7020e45841797e9091e4ee0cf81d5447a496b656

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M src/core/serialize.csrc/core/serialize.c

@@ -327,9 +327,10 @@ }

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); }