Browse Source

avcodec/vc1dec: Require res_sprite for wmv3images

non res_sprite leads to decoder delay which leads to assertion failure
Fixes: Assertion failure
Fixes: 16402/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-5704510034411520
Fixes: left shift of 1073741824 by 1 places cannot be represented in type 'int'
Fixes: 16425/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-5692858838810624

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 9c6b400492)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2.15
Michael Niedermayer 6 years ago
parent
commit
50e0d2b1dc
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/vc1dec.c

+ 5
- 0
libavcodec/vc1dec.c View File

@@ -450,6 +450,11 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
if ((ret = ff_vc1_decode_sequence_header(avctx, v, &gb)) < 0)
return ret;

if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE && !v->res_sprite) {
avpriv_request_sample(avctx, "Non sprite WMV3IMAGE");
return AVERROR_PATCHWELCOME;
}

count = avctx->extradata_size*8 - get_bits_count(&gb);
if (count > 0) {
av_log(avctx, AV_LOG_INFO, "Extra data: %i bits left, value: %X\n",


Loading…
Cancel
Save