aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-08-06 23:30:02 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-08-13 16:48:38 +0200
commitdb78bc1297ebaa51cfe5c80775808ec11ed7512b (patch)
tree6bf50b297301c6876fc35a7022a4e114082e0c20
parenta3e572d96fd1dd6291f6b28e173db858c08ff8d8 (diff)
downloadffmpeg-db78bc1297ebaa51cfe5c80775808ec11ed7512b.tar.gz
avcodec/vp56: Consider the alpha start as end of the prior header
Fixes: Timeout (23sec -> 71ms) Fixes: 15661/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP6A_fuzzer-6257865947348992 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/vp56.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index 72fea3780e..695f37e972 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -572,7 +572,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
VP56Context *s = avctx->priv_data;
AVFrame *const p = s->frames[VP56_FRAME_CURRENT];
int remaining_buf_size = avpkt->size;
- int av_uninit(alpha_offset);
+ int alpha_offset = remaining_buf_size;
int i, res;
int ret;
@@ -585,7 +585,7 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
return AVERROR_INVALIDDATA;
}
- res = s->parse_header(s, buf, remaining_buf_size);
+ res = s->parse_header(s, buf, alpha_offset);
if (res < 0)
return res;