Commit 99c7b516 authored by Reimar Döffinger's avatar Reimar Döffinger

Abort if command offset decreases, avoids potential endless loop.

Signed-off-by: 's avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
parent 1816addc
......@@ -344,6 +344,10 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
sub_header->rects[0]->pict.linesize[0] = w;
}
}
if (next_cmd_pos < cmd_pos) {
av_log(NULL, AV_LOG_ERROR, "Invalid command offset\n");
break;
}
if (next_cmd_pos == cmd_pos)
break;
cmd_pos = next_cmd_pos;
......
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