avformat/iamf_reader: propagate avio_skip() error values

Fixes: null pointer derference
Fixes: 67007/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-6522819204677632

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2024-03-20 23:52:36 -03:00
parent e04c638f5f
commit 97d2990ea6

View File

@ -310,10 +310,8 @@ int ff_iamf_read_packet(AVFormatContext *s, IAMFDemuxContext *c,
c->recon_size = 0;
} else {
int64_t offset = avio_skip(pb, obu_size);
if (offset < 0) {
ret = offset;
break;
}
if (offset < 0)
return offset;
}
max_size -= len;
if (max_size < 0)