diff -Naur mplayer2-2.0.ori/sub/subreader.c mplayer2-2.0/sub/subreader.c --- mplayer2-2.0.ori/sub/subreader.c 2011-03-24 17:40:29.000000000 -0400 +++ mplayer2-2.0/sub/subreader.c 2011-10-14 15:04:47.196477670 -0400 @@ -179,6 +179,8 @@ break; case 3: /* get all text until '<' appears */ + if (p - text >= LINE_LEN) + sami_add_line(current, text, &p); if (*s == '\0') break; else if (!strncasecmp (s, "
", 4)) { sami_add_line(current, text, &p);