vobsub: add sanity check

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27873 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
aurel 2008-11-01 13:51:39 +00:00
parent 74dd64e71d
commit b64af5543c
1 changed files with 2 additions and 1 deletions

View File

@ -852,7 +852,8 @@ vobsub_parse_one_line(vobsub_t *vob, rar_stream_t *fd)
char *line = NULL;
do {
line_size = vobsub_getline(&line, &line_reserve, fd);
if (line_size < 0) {
if (line_size < 0 || line_size > 1000000 ||
vob->extradata_len+line_size > 10000000) {
break;
}