1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-03-17 20:17:55 +02:00

avcodec/wmaprodec: Set packet_loss when we error out on a sanity check

Fixes: left shift of negative value -34
Fixes: 18719/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMAPRO_fuzzer-5642658173419520

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a9cbd25d89dbdf72f7b616fdf672d7da36143cfe)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2019-11-12 20:25:00 +01:00
parent 3510a1869e
commit 7c15568a50

View File

@ -1548,6 +1548,7 @@ static int decode_packet(AVCodecContext *avctx, void *data,
if (buf_size < avctx->block_align) {
av_log(avctx, AV_LOG_ERROR, "Input packet too small (%d < %d)\n",
buf_size, avctx->block_align);
s->packet_loss = 1;
return AVERROR_INVALIDDATA;
}