[Mplayer-cvslog] CVS: main subreader.c,1.62,1.63

Arpi of Ize arpi at mplayerhq.hu
Fri May 31 23:48:38 CEST 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv31542

Modified Files:
	subreader.c 
Log Message:
sub_read_line_ssa sig11 fix by Jindrich Makovicka <makovick at 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.



Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- subreader.c	30 May 2002 17:44:58 -0000	1.62
+++ subreader.c	31 May 2002 21:48:36 -0000	1.63
@@ -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;
 }




More information about the MPlayer-cvslog mailing list