[MPlayer-cvslog] r21853 - trunk/libass/ass_mp.c
reimar
subversion at mplayerhq.hu
Sun Jan 7 17:07:45 CET 2007
Author: reimar
Date: Sun Jan 7 17:07:45 2007
New Revision: 21853
Modified:
trunk/libass/ass_mp.c
Log:
Avoid invalid memory access in ass_process_subtitle for empty subtitles
with sub->lines <= 0
Modified: trunk/libass/ass_mp.c
==============================================================================
--- trunk/libass/ass_mp.c (original)
+++ trunk/libass/ass_mp.c Sun Jan 7 17:07:45 2007
@@ -175,7 +175,7 @@
for (j = 0; j < sub->lines; ++j)
p += snprintf(p, end - p, "%s\\N", sub->text[j]);
- p-=2; // remove last ' '
+ if (sub->lines > 0) p-=2; // remove last "\N"
*p = 0;
if (check_duplicate_plaintext_event(track)) {
More information about the MPlayer-cvslog
mailing list