]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/wmaprodec: Set packet_loss when we error out on a sanity check
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 12 Nov 2019 19:25:00 +0000 (20:25 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 10 Dec 2019 15:09:14 +0000 (16:09 +0100)
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>
libavcodec/wmaprodec.c

index 775f17381fb61bd987e6e50c9a88839a415a2172..91a47aeb41ae2d59bd600264561a02badf131472 100644 (file)
@@ -1644,6 +1644,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;
         }