Skip to content
Snippets Groups Projects
Commit debf4d6e authored by banastasov's avatar banastasov Committed by Michael Niedermayer
Browse files

avcodec/dvbsubdec: Fix buf_size check in dvbsub_parse_display_definition_segment()


Fixes Ticket4326

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent aa9c6b69
No related branches found
No related tags found
No related merge requests found
......@@ -1504,10 +1504,10 @@ static int dvbsub_parse_display_definition_segment(AVCodecContext *avctx,
avctx->height = display_def->height;
}
if (buf_size < 13)
return AVERROR_INVALIDDATA;
if (info_byte & 1<<3) { // display_window_flag
if (buf_size < 13)
return AVERROR_INVALIDDATA;
display_def->x = bytestream_get_be16(&buf);
display_def->width = bytestream_get_be16(&buf) - display_def->x + 1;
display_def->y = bytestream_get_be16(&buf);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment