Commit 7c10068d authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/dvbsubdec: Check for duplicate regions in dvbsub_parse_page_segment()

Fixes: OOM
Fixes: 3051/clusterfuzz-testcase-minimized-5745818336231424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8a0954dd
......@@ -1302,6 +1302,15 @@ static int dvbsub_parse_page_segment(AVCodecContext *avctx,
region_id = *buf++;
buf += 1;
display = ctx->display_list;
while (display && display->region_id != region_id) {
display = display->next;
}
if (display) {
av_log(avctx, AV_LOG_ERROR, "duplicate region\n");
break;
}
display = tmp_display_list;
tmp_ptr = &tmp_display_list;
......
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