Mercurial > mplayer.hg
changeset 6247:0b8660d79efe
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.
author | arpi |
---|---|
date | Fri, 31 May 2002 21:48:36 +0000 |
parents | ce7422676d5e |
children | bd789010874b |
files | subreader.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/subreader.c Fri May 31 21:44:39 2002 +0000 +++ b/subreader.c Fri May 31 21:48:36 2002 +0000 @@ -396,7 +396,7 @@ 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 @@ if (current->lines >= SUB_MAX_TEXT) return current; } - current->text[num]=strdup(line2); + current->lines++; return current; }