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/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2018-12-06 00:09:37 +01:00
parent 52ba824c65
commit 35a603050d

View File

@ -595,6 +595,7 @@ static int dvdsub_decode(AVCodecContext *avctx,
}
if (is_menu < 0) {
ctx->buf_size = 0;
no_subtitle:
reset_rects(sub);
*data_size = 0;