summaryrefslogtreecommitdiffstats
path: root/subreader.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-22 21:16:54 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-01-22 21:16:54 +0000
commit1e4f16a344ef975eec159a01ae5e902e5f75bcc1 (patch)
tree36eca5122346009413eddcad4679cd3e15d2fb28 /subreader.c
parent66998a98daef91678a51c3477fd06c59e1d7105a (diff)
downloadmpv-1e4f16a344ef975eec159a01ae5e902e5f75bcc1.tar.bz2
mpv-1e4f16a344ef975eec159a01ae5e902e5f75bcc1.tar.xz
Replace strncat by av_strlcat which is easier to verify for correctness.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30388 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subreader.c')
-rw-r--r--subreader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/subreader.c b/subreader.c
index 4c1c0a8181..953b491136 100644
--- a/subreader.c
+++ b/subreader.c
@@ -20,6 +20,7 @@
#include "subreader.h"
#include "stream/stream.h"
#include "libavutil/common.h"
+#include "libavutil/avstring.h"
#ifdef CONFIG_ENCA
#include <enca.h>
@@ -990,8 +991,7 @@ static subtitle *sub_read_line_jacosub(stream_t* st, subtitle * current)
if (!stream_read_line(st, directive, LINE_LEN))
return NULL;
trail_space(directive);
- strncat(line2, directive,
- (LINE_LEN > 511) ? LINE_LEN : 511);
+ av_strlcat(line2, directive, LINE_LEN);
break;
}
default: