diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-31 21:48:36 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-31 21:48:36 +0000 |
commit | e8235b8140cf6bd16c22b60c4c703c25b931088c (patch) | |
tree | 074ecf275830ee78577c1c642009f4a9e083904a /subreader.c | |
parent | 3bd1f1e5055f49269338068c9e329a6b5a9fd005 (diff) | |
download | mpv-e8235b8140cf6bd16c22b60c4c703c25b931088c.tar.bz2 mpv-e8235b8140cf6bd16c22b60c4c703c25b931088c.tar.xz |
sub_read_line_ssa sig11 fix by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
when this function encounters a multiline subtitle with more lines than
SUB_MAX_TEXT, this stupid bug manifests. The function actually reads one
line less than the returned count. Subsequently, either during iconv or
during playing a null pointer gets referenced, with obvious result.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6248 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r-- | subreader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subreader.c b/subreader.c index df5d00bcc0..003303d63e 100644 --- a/subreader.c +++ b/subreader.c @@ -396,7 +396,7 @@ subtitle *sub_read_line_ssa(FILE *fd,subtitle *current) { line2 ++; line2 ++; - current->lines=1;num=0; + current->lines=0;num=0; current->start = 360000*hour1 + 6000*min1 + 100*sec1 + hunsec1; current->end = 360000*hour2 + 6000*min2 + 100*sec2 + hunsec2; @@ -410,8 +410,8 @@ subtitle *sub_read_line_ssa(FILE *fd,subtitle *current) { if (current->lines >= SUB_MAX_TEXT) return current; } - current->text[num]=strdup(line2); + current->lines++; return current; } |