aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-11-12 20:25:00 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-02 19:55:08 +0200
commit081aa19ac93af7a7aec2233d29621c801ed5101d (patch)
treec6295af87832d658a9a1594686241eb41cde773e
parent47d0725b91eb1b59722dd0ba6b8c9226c05d8ad7 (diff)
downloadffmpeg-081aa19ac93af7a7aec2233d29621c801ed5101d.tar.gz
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>
-rw-r--r--libavcodec/wmaprodec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index ee2b3c5e2b..28824ed11f 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -1616,6 +1616,7 @@ static int decode_packet(AVCodecContext *avctx, WMAProDecodeCtx *s,
if (avctx->codec_id == AV_CODEC_ID_WMAPRO && 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;
}