1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Abort if command offset decreases, avoids potential endless loop.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
Reimar Döffinger 2011-08-03 20:09:53 +02:00
parent 1816addc4e
commit 99c7b51641

View File

@ -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;