diff --git a/src/core/serialize.c b/src/core/serialize.c index 203ed809a..4f7c07a4a 100644 --- a/src/core/serialize.c +++ b/src/core/serialize.c @@ -131,6 +131,9 @@ bool mStateExtdataDeserialize(struct mStateExtdata* extdata, struct VFile* vf) { if (vf->seek(vf, header.offset, SEEK_SET) < 0) { return false; } + if (header.size <= 0) { + continue; + } struct mStateExtdataItem item = { .data = malloc(header.size), .size = header.size,