mirror of https://github.com/mgba-emu/mgba.git
Core: Extdata should not have a size < 0
This commit is contained in:
parent
59b561b8c0
commit
da553d191f
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue