# HG changeset patch # User arpi # Date 1022881716 0 # Node ID 0b8660d79efe07c8927983653249910f00ee2ddd # Parent ce7422676d5e235404f9acd9559d8e9acce4d360 sub_read_line_ssa sig11 fix by Jindrich Makovicka 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. diff -r ce7422676d5e -r 0b8660d79efe subreader.c --- 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; }