diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2023-10-05 14:38:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2023-10-16 01:09:09 +0200 |
commit | fff875a7f4d36874733598fd7c0dc81136e1ed05 (patch) | |
tree | 3e7c842410f3c09368640b1aae9473936a2adbee /libavformat | |
parent | cd66606a8f9124a75a126d579c18f263b874d3a5 (diff) | |
download | ffmpeg-fff875a7f4d36874733598fd7c0dc81136e1ed05.tar.gz |
avformat/usmdec: do not return 0 when no packet was produced
Fixes: Assertion pkt->stream_index < (unsigned)s->nb_streams && "Invalid stream index.\n" failed at libavformat/demux.c:617
Fixes: 62498/clusterfuzz-testcase-minimized-ffmpeg_dem_USM_fuzzer-4734740995112960
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/usmdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/usmdec.c b/libavformat/usmdec.c index 1665eb8e55..ee403e7a84 100644 --- a/libavformat/usmdec.c +++ b/libavformat/usmdec.c @@ -361,7 +361,7 @@ static int64_t parse_chunk(AVFormatContext *s, AVIOContext *pb, ret = avio_skip(pb, FFMAX(0, chunk_size - (ret - chunk_start))); if (ret < 0) return ret; - return 0; + return FFERROR_REDO; } static int usm_read_packet(AVFormatContext *s, AVPacket *pkt) |