Message ID | 20170301032823.21497-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 4bed06637729ab000b79250c67d53078300e37c4 |
Headers | show |
On Wed, Mar 01, 2017 at 04:28:23AM +0100, Michael Niedermayer wrote: > Similar code is used elsewhere in vp56 to force a more complete reinit in the future. > Fixes null pointer dereference > Fixes: 707/clusterfuzz-testcase-4717453097566208 > > 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 | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) applied [...]
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index a9a1a0c1d5..5ea365375b 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -572,13 +572,18 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, } ret = ff_get_buffer(avctx, p, AV_GET_BUFFER_FLAG_REF); - if (ret < 0) + if (ret < 0) { + if (res == VP56_SIZE_CHANGE) + ff_set_dimensions(avctx, 0, 0); return ret; + } if (avctx->pix_fmt == AV_PIX_FMT_YUVA420P) { av_frame_unref(s->alpha_context->frames[VP56_FRAME_CURRENT]); if ((ret = av_frame_ref(s->alpha_context->frames[VP56_FRAME_CURRENT], p)) < 0) { av_frame_unref(p); + if (res == VP56_SIZE_CHANGE) + ff_set_dimensions(avctx, 0, 0); return ret; } }
Similar code is used elsewhere in vp56 to force a more complete reinit in the future. Fixes null pointer dereference Fixes: 707/clusterfuzz-testcase-4717453097566208 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)