Core: Extdata should not have a size < 0

This commit is contained in:
Vicki Pfau 2024-09-01 01:36:07 -07:00
parent 59b561b8c0
commit da553d191f
1 changed files with 3 additions and 0 deletions

View File

@ -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,