diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-10 18:37:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-10 22:52:35 +0200 |
commit | 6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef (patch) | |
tree | c6e3ef0b27a8268e8527ae795bcd13e827a5d992 /libavcodec/vp8.c | |
parent | 942036e97c8b149ce2f3ec6e7cbc990df8713d0c (diff) | |
download | ffmpeg-6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef.tar.gz |
avcodec/webp: Always set pix_fmt
Fixes: out of array access
Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632
Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r-- | libavcodec/vp8.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index fe7aa23491..5bf601a8ef 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2550,6 +2550,8 @@ int vp78_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, enum AVDiscard skip_thresh; VP8Frame *av_uninit(curframe), *prev_frame; + av_assert0(avctx->pix_fmt == AV_PIX_FMT_YUVA420P || avctx->pix_fmt == AV_PIX_FMT_YUV420P); + if (is_vp7) ret = vp7_decode_frame_header(s, avpkt->data, avpkt->size); else |