diff mbox

[FFmpeg-devel] avcodec/vp56: Check avctx->error_concealment before enabling EC

Message ID 20170316104904.9337-1-michael@niedermayer.cc
State Accepted
Commit 98da63b3f5f5a277c5c3a16860db9a9f6741e54c
Headers show

Commit Message

Michael Niedermayer March 16, 2017, 10:49 a.m. UTC
Fixes timeout with 847/clusterfuzz-testcase-5291877358108672
Fixes timeout with 850/clusterfuzz-testcase-5721296509861888

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavcodec/vp56.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer March 20, 2017, 12:01 a.m. UTC | #1
On Thu, Mar 16, 2017 at 11:49:04AM +0100, Michael Niedermayer wrote:
> Fixes timeout with 847/clusterfuzz-testcase-5291877358108672
> Fixes timeout with 850/clusterfuzz-testcase-5721296509861888
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavcodec/vp56.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied


[...]
Ronald S. Bultje March 20, 2017, 12:10 a.m. UTC | #2
Hi,

On Sun, Mar 19, 2017 at 8:01 PM, Michael Niedermayer <michael@niedermayer.cc
> wrote:

> On Thu, Mar 16, 2017 at 11:49:04AM +0100, Michael Niedermayer wrote:
> > Fixes timeout with 847/clusterfuzz-testcase-5291877358108672
> > Fixes timeout with 850/clusterfuzz-testcase-5721296509861888
> >
> > Found-by: continuous fuzzing process https://github.com/google/oss-
> fuzz/tree/master/targets/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> > ---
> >  libavcodec/vp56.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> applied


Sorry about not responding earlier again - patch was OK. I'll try to be
better at explicitly approving patches that are good and that I feel I'm an
appropriate reviewer for...

Ronald
diff mbox

Patch

diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index 9d4162bb96..bfc3d3bc7c 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -712,7 +712,7 @@  static int ff_vp56_decode_mbs(AVCodecContext *avctx, void *data,
                 int ret = vp56_decode_mb(s, mb_row, mb_col, is_alpha);
                 if (ret < 0) {
                     damaged = 1;
-                    if (!s->have_undamaged_frame) {
+                    if (!s->have_undamaged_frame || !avctx->error_concealment) {
                         s->discard_frame = 1;
                         return AVERROR_INVALIDDATA;
                     }