History

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

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

Michael Niedermayer committed 9 years ago

Commit 7c100681 parent 8a0954d1 file · +9 −0Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/dvbsubdec.c+9−0
@@ -1302,6 +1302,15 @@ static int dvbsub_parse_page_segment(AVCodecContext *avctx, · 1301 unmodified lines
13021302 region_id = *buf++;
13031303 buf += 1;
13041304
1305+ display = ctx->display_list;
1306+ while (display && display->region_id != region_id) {
1307+ display = display->next;
1308+ }
1309+ if (display) {
1310+ av_log(avctx, AV_LOG_ERROR, "duplicate region\n");
1311+ break;
1312+ }
1313+
13051314 display = tmp_display_list;
13061315 tmp_ptr = &tmp_display_list;
13071316

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t