Browse Source

Abort if command offset decreases, avoids potential endless loop.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
tags/n0.9
Reimar Döffinger 14 years ago
parent
commit
99c7b51641
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavcodec/dvdsubdec.c

+ 4
- 0
libavcodec/dvdsubdec.c View File

@@ -344,6 +344,10 @@ static int decode_dvd_subtitles(AVSubtitle *sub_header,
sub_header->rects[0]->pict.linesize[0] = w; 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) if (next_cmd_pos == cmd_pos)
break; break;
cmd_pos = next_cmd_pos; cmd_pos = next_cmd_pos;


Loading…
Cancel
Save