diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-06-07 18:53:20 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:07:12 +0200 |
commit | 074e6b4622429ee4f378d31be7537f72e4d4e7f2 (patch) | |
tree | abe315077a5b90ee8a5d27d73b4342bf2d39bdba | |
parent | ae85c8c2ce61aee5a67ff7c8da98c61b108d8e36 (diff) | |
download | mpv-074e6b4622429ee4f378d31be7537f72e4d4e7f2.tar.bz2 mpv-074e6b4622429ee4f378d31be7537f72e4d4e7f2.tar.xz |
subreader.c: check for max line count in SAMI subtitle reader
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31345 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | subreader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subreader.c b/subreader.c index 59209d9d59..200fd6f9f5 100644 --- a/subreader.c +++ b/subreader.c @@ -161,7 +161,7 @@ static subtitle *sub_read_line_sami(stream_t* st, subtitle *current, int utf16) if (*s == '\0') break; else if (!strncasecmp (s, "<br>", 4)) { *p = '\0'; p = text; trail_space (text); - if (text[0] != '\0') + if (text[0] != '\0' && current->lines < SUB_MAX_TEXT) current->text[current->lines++] = strdup (text); s += 4; } @@ -242,7 +242,7 @@ static subtitle *sub_read_line_sami(stream_t* st, subtitle *current, int utf16) if (current->end <= 0) { current->end = current->start + sub_slacktime; *p = '\0'; trail_space (text); - if (text[0] != '\0') + if (text[0] != '\0' && current->lines < SUB_MAX_TEXT) current->text[current->lines++] = strdup (text); } |