Message ID | 20230920003034.7241-5-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 52d666edec73c834c60811e330f86a7cf1d916da |
Headers | show |
Series | [FFmpeg-devel,1/5] avcodec/flacdec: Fix overflow in "33bit" decorrelate | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavformat/avs.c b/libavformat/avs.c index ab47980a11c..19f03731573 100644 --- a/libavformat/avs.c +++ b/libavformat/avs.c @@ -140,6 +140,10 @@ static int avs_read_audio_packet(AVFormatContext * s, AVPacket * pkt) return 0; /* this indicate EOS */ if (ret < 0) return ret; + if (size != (int)size) { + av_packet_unref(pkt); + return AVERROR(EDOM); + } pkt->stream_index = avs->st_audio->index; pkt->flags |= AV_PKT_FLAG_KEY;
Fixes: leak Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-6738814988320768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/avs.c | 4 ++++ 1 file changed, 4 insertions(+)