Commit 35a60305 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dvdsubdec: discard accumulated buffer on error

Fixes: Timeout
Fixes: 10992/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DVDSUB_fuzzer-5657495410835456

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 52ba824c
...@@ -595,6 +595,7 @@ static int dvdsub_decode(AVCodecContext *avctx, ...@@ -595,6 +595,7 @@ static int dvdsub_decode(AVCodecContext *avctx,
} }
if (is_menu < 0) { if (is_menu < 0) {
ctx->buf_size = 0;
no_subtitle: no_subtitle:
reset_rects(sub); reset_rects(sub);
*data_size = 0; *data_size = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment